RE: [boost] shared_ptr, interface and dlls

8 Dec
2004
8 Dec
'04
5:51 p.m.
From: Peter Dimov [mailto:pdimov@mmltd.net]
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?
Oh, ABI compatibility is an entirely different issue, I agree. However, if you want to write your own component model you have to use an entry point with extern C linkage, even though the whole thing will be compiled with the same toolchain. Regards, Stefan
7492
Age (days ago)
7492
Last active (days ago)
0 comments
1 participants
participants (1)
-
Stefan Seefeld