From: Greg C. <chi...@mi...> - 2003-11-17 22:35:42
|
Jeff Williams wrote: > > Is this considered "legal"? Specifically, the issue is > passing a std::string accross dll boundaries. Can I do it > without compiling libstdc++ as a DLL? > > The reason I ask is because I get occassional program crashes > and the backtrace always ends up being in an stl allocator. I don't know of any reason why it wouldn't be OK to pass a std::string across a dll boundary, as long as the string class's object layout matches. But why not just pass a 'char const*'? Then you could call your extern "C" functions from a C program, and the stl allocator doesn't come into play outside the dll. |