[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: dlsym() and C++
Magnus Norddahl wrote:
> If I use dlopen() and dlsym() to get a pointer to a global function in
> a C++ library, the thing dumps core when I call it.
>
> If I use excatly the same procedure when it's a C library, everything
> is fine, and a small message is printed to the screen.
I've had no problems running dlopen() and dlsym() on a C++ library.
Xhedgehog and GNUdius both rely upon C++ objects and functions
encapsulated within DLL's. But the symbols I'm trying to access have all
been declared extern "C". Maybe you should give that a try. Write
functions to access the objects within your DLL and declare them extern
"C", then link to those functions.
--
----------------------------------------------------------------------
Jeff Read <bitwize@geocities.com>/ http://genpc.home.ml.org
Unix / Linux / Windows Hacker, / Boycott Microsoft!
Anime & Sonic Fan, / Use Linux/GNU!
All Around Nice Guy / Let's keep the Net and the Land FREE!
----------------------------------------------------------------------