Re: [Anjuta-list] Linking



Hi Alvaro,

Alvaro Isaza a écrit :
How can i specify libraries to link against in anjuta like in the command line:
   gcc -o flm -lg2 -lm -lX11 -lgd flm.c gethex.c

You can specify some additional flag when compiling your target. You need to select your target, right click, select property, click on advanced and add them in linker flags.


But the normal way to add a library is to select Project->Properties->Package, then create a module add all needed library (named package). Then select your target, right click, select property and check all module needed. You can put several libraries in one module and use several modules.

Using this last way, you will automatically get the options needed for reading the include files and the configure script will check if the library is present.


And how to make a static executable program?

There is a library project template. So the easiest solution is to create a new project from this template (New->Project->C->Library) and add your source files.


Regards,

Sébastien




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]