linking with a pragma with g++
In Visual C++, one may link to a library in the code itself by doing #pragma comment (lib, "libname.lib") . Is something similar possible in g++? The Boost Config library has some support for autolinking, using the relevant compiler-specific code for the particular compiler. However, the docs note that the GCC toolchain doesn't support autolinking : Auto-Linking Most Windows compilers and linkers have so-called “auto-linking support,” which eliminates the second challenge. Special code in Boost header files detects your compiler options and uses that information to encode the name of the