
25 Nov
2004
25 Nov
'04
11:42 a.m.
Roland Schwarz wrote:
John Maddock wrote:
That's your problem: there must be one single rtl shared both by your code and the Boost.Threads dll: and that means using the dynamic C runtime.
That surprises me somewhat. Explicitely:
mydll depending on dynamic CRT.
myapp depending on static CRT and depending on mydll.
You think this is not possible? Just tried it. Found no obvious problem. Are there hidden traps?
It works as long as you don' allocate in one and delete in the other. C-style interfaces are fine, but passing a std::string from the EXE to the DLL (or vice versa) will fail. shared_ptr will work, though :-) unless you unload the DLL that has created it, of course. Deleting an object with a virtual destructor works, too.