1 Sep 2007 02:53
Re: loading multiple C++ runtimes but not mixing ABIs?
Ken Raeburn <raeburn <at> raeburn.org>
2007-09-01 00:53:44 GMT
2007-09-01 00:53:44 GMT
On Aug 31, 2007, at 16:36, Lawrence Crowl wrote: > The most likely problem will be mangled names. Do the two ABIs > use the same mangling scheme? If so, you could have a problem > with a function from one ABI stepping on another. You can reduce > this problem by forcing bindings to a particular library, which is > pretty much automatic on Windows, but requires extra work on > Unix systems. You can also, on some systems, restrict the set of > symbols. Visible to other libraries. If symbol versioning is in use, it shouldn't matter. But when it's not... I would assume (from the ignorant point of view of someone doing very little C++ work) that most compiler vendors would be converging on a common name mangling scheme to promote interoperability, which would mean more name conflicts. > Don't use the global operators new and delete. > Don't use exceptions. Set the compiler option that turns them > off. > Don't use RTTI functions. > If you use the standard library, make sure you link it > statically into > your library and restrict the resulting symbol scope. (E.g. using > map files.) > > In summary, it can be done but you'll need to manage more symbols > than you'd expect. It's sounding like the remaining benefits wouldn't be worth the hassle... And yet, some people do manage to program in C++. :) Is the usual procedure, then, to just require that the application(Continue reading)
RSS Feed