This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
RE: dlopen() returns undefined symbol for library w/ RTLD_LAZY
- From: "John (Eljay) Love-Jensen" <eljay at adobe dot com>
- To: Davidzeu <davidzeu at gmail dot com>, "gcc-help at gcc dot gnu dot org" <gcc-help at gcc dot gnu dot org>
- Date: Thu, 23 Jul 2009 04:41:16 -0700
- Subject: RE: dlopen() returns undefined symbol for library w/ RTLD_LAZY
- References: <24621028.post@talk.nabble.com>
Hi David,
When I run into undefined symbol problems, the first thing I do is make sure the symbol is where I think it is.
Use the 'nm' tool to get a dump of where (and what) you expect the symbol to be.
It may be something as simple as looking for "Foo", but the C symbol is "_Foo" on this other platform. That's "C mangling" on some platforms.
Or it may be something more drastic as looking for "Foo", but the C++ symbol is "_S3FooCCpC" mangled which could stand for "Foo(char, char, char*)" -- and that mangled symbol should be (and is expected to be) C mangled not C++ mangled.
HTH,
--Eljay