From: Filip N. <xn...@vo...> - 2003-07-09 17:19:26
|
> > > I tried setjmp/longjmp and it is compatible between MSVC and MinGW, > > but it can't be used with C++ classes. > > Oh, but if you want exceptions in C++, the _only_ good solution is to > use the native C++ exceptions. Sure, I would use them, if I could. But I need to be able access my DLL from MSVC :( > > Any other nonstandard exception layer that would behave correctly > (pertaining to destructor invocation) would have to invoke the native > exceptions in some point. And - why would you use any nonstandard > layer that relies on native exceptions, instead of using the native > (and standard!) exceptions themselves? > Same answer here. > The old MSVC exception macros are emulated exactly this way. > > BUT your problem isn't just that the native C++ exceptions are > incompatible across MSVC and MinGW, but that much of C++ isn't > compatible. Right, but using virtual interfaces and exported functions like "CreateMyClass()" that create the actual class instances is one way to go. I mean something like the method used by DirectX, but without the COM stuff. Filip Navara |