In message <[EMAIL PROTECTED]>, Thomas Drillich <[EMAIL PROTECTED]> wrote:
> Hi > > I'm trying to run the C++ dlopen example from > http://www.linux.org/docs/ldp/howto/C++-dlopen/thesolution.html. > but I always get the error message > "Cannot load library: .libs/libtriangle.so: undefined symbol: > _ZTI7Polygon" > > I see that the compiler renames the >Polygon< class, the >Polygon< class > is defined in a header file and included in main-program and plugin-lib. Are you sure you haven't added a non-inline virtual function to the Polygon class? > But it seems that the compiler creates different symbol names each time. It shouldn't do that. > g++ -O0 -g3 -o cpp_dlopentest cpp_dlopentest.o -ldl You should pass -rdynamic when linking the main program so that the plugin can refer to symbols in main program. -- OpenPGP key fingerprint: D0A6 F403 9745 CED4 6B3B 94CC 8D74 8FC9 9F7F CFE4 _______________________________________________ help-gplusplus mailing list help-gplusplus@gnu.org http://lists.gnu.org/mailman/listinfo/help-gplusplus