gcc 4.6 does not add the shared lib to the executable if no symbols from it are referenced. This is a deviation from earlier gcc behavior (they always added the shared library). gcc 4.6 adds the --as-needed option to the linker (ld) command line so we need to turn that off. Fix: add --no-as-needed in front of the library |