Converting C to C++, dynamic linker problem

Posted by RosenGuild on Sun 03 Sep 2006 12:04 AM — 4 posts, 18,456 views.

USA #0
Alrighty. I'm trying to update my MUD to c++, but have run into a bit of trouble... namely:

Quote:
Sat Sep 2 18:47:20 2006 :: [*****] BUG: Error locating do_say in symbol table. ../bin/swr: undefined symbol: do_say
Sat Sep 2 18:47:20 2006 :: [*****] BUG: Fread_command: Function do_say not found for '


I know this is because I updated the MUD from C to C++, something dlopen and whatnot don't like. I'm operating Fedora Core 5, and the MUD is SWFOTEFUSS. So... comments on how to solve this situation? I appreciate it, thanks.

-RosenGuild
USA #1
Using FUSS right? Make sure you have the right Makefile flags toggled.
Australia Forum Administrator #2
I suspect this is a name-mangling problem. I converted to C++ ok, but not with dynamic linking.

C++ mangles names so that it can build in the function argument types into each name (as you can have identically-named functions with different argument lists).

Thus the problem is probably either:

  • You are looking for a mangled name, but the dynamic library has them un-mangled; or
  • You are looking for an un-mangled name, but the dynamic library has them mangled

USA #3
http://forums.smaugfuss.org/index.php?a=topic&t=82

[EDIT - 11 March 2008] - The Smaug FUSS site is now http://www.smaugmuds.org/