
8 Dec
2004
8 Dec
'04
5:36 p.m.
Stefan Seefeld wrote:
When writing plugins under linux (i.e. with 'dlopen' etc.), I believe I have already used a function returning a std::auto_ptr as entry point for the loader. What is wrong with that ? Is your advice above simply due to a limitation with MSVC ?
It seems so. From a quick test, g++ and bcc32 do return C++ classes from extern "C" functions, only MSVC emits an error. I'm not sure whether such a function makes sense, though. If you suppress name mangling, presumably because two different compilers mangle names differently, what are the chances that the object layout will be the same?