LDLIB

From VrlWiki
Jump to navigation Jump to search
LDLIB += <Linker Setting>  ...

Set LDLIB when you want to directly link libraries. Use the += assignment unless you explicitly intend to clear prior settings. This setting is for advanced users that understand command line options for the linker on the platforms they work with. In particular the order that libraries are linked matters. The linker will search libraries in the order listed.

You should avoid using absolute paths. Directories can be referenced using these variables:

G_IMPORT         # The directory containing third party software.
G_INSTALL        # The directory where projects are installed.


Examples:

LDLIB += -L$(G_IMPORT)/sdl/sdl_1.2.13_gcc3/lib   -lSDL              # Linux
LDLIB += -LIBPATH:"$(G_IMPORT)/sdl/sdl_1.2.13_gcc3/lib"  SDL.lib    # Windows