[Geany] Compiler Options

Nick Treleaven nick.treleaven at xxxxx
Thu Jan 26 11:32:01 UTC 2006


On 26/01/06 09:09:27, Wenger-Lehrmittel at t-online.de wrote:
> If I compile direct in the bash i write:
> 
> gcc -I/usr/X11R6/include -L/usr/X11R6/lib -lfltk -lGL vier.cpp
> 
> How could I use this in geany?
> 
> It compiles when I set -I/usr/X11R6/include in the copile-options,  
> but it dos not link with the -L/.....  and -l... -l... in the  
> programm-options.

Hi,
With Geany 0.4, the Build->Compile menu command is always for building  
object files (.o). This is because it passes the -c argument for  
compile only to gcc. It uses the compiler arguments setting.

Build->Build can be for linking object files to create an executable  
program, or it can be setup to compile and link if there is no object  
file that corresponds to the source file. It uses the linker arguments  
setting.

For compile and link in one step you could just use the Build command  
if you set the link options (Build->Set Includes and Arguments) to the  
same arguments you would use in Bash, i.e.:
arguments to compiler: (just leave blank, don't use Compile)
arguments to linker: -I/usr/X11R6/include -L/usr/X11R6/lib -lfltk -lGL
arguments to program: (leave blank, nothing to do with building)

Obviously the -I include linker argument is nothing to do with linking,  
but I think this is the simplest way using Build->Build for single file  
programs and gcc will understand it the same as running gcc from the  
Bash shell.

Regards,
Nick



More information about the Users mailing list