I am trying to link an executable with a number of shared libraries.
Functions in some of these libraries refer to other functions which are
defined by objects within the executable code.  Think of these as
callbacks.  These symbols are specified with "#pragma weak symbol" as
the expectation is that not all objects linking against these libs
use/need all of the symbols.  All objects (in library and main program)
were compiled with -fPIC.  The shared library is compiled with -shared.
 The executable is linked with --export-dynamic.

Here is the problem:
If I link against the archive libraries the program links fine and it
runs.
If I link against the shared libraries the linker complains about
undefined symbols.  When I quiet these errors down with
--allow-shlib-undefined then the linking completes.  But at run time
the loader complains about undefined symbols.
Am I missing some compiler options when linking the .so libraries?

Thanks for any help.

_______________________________________________
Help-gplusplus mailing list
Help-gplusplus@gnu.org
http://lists.gnu.org/mailman/listinfo/help-gplusplus

Reply via email to