Browse - Programming Tips - Normally you want to link to shared (.so) files. You do that

Date: 2011dec7
OS: Linux
Product: Jam
Keywords: shared, Jamfile, .a, static, archive

Q.  Normally you want to link to shared (.so) files.  You do that
by using the -l flag to the LINKFLAGS, like this:

LINKFLAGS = -L/usr/lib -pthread -lfam -lstdc++ ;
But what if you want to statically link to a library (.a)? A. Use the LinkLibraries directive in your Jamfile. For example:
Main myprog : myprog.cpp ; LinkLibraries myprog : libconfig-1.4.8/lib/.libs/libconfig.a ;