I have a problem wiht NDEBUG and _DEBUG settings from VC6. Usualy i'm delivering my DLLs compiled with NDEBUG, but the problem appears when the clients are using this dlls in their applications compiled with _DEBUG. The problem is that the application is crashing if one std object created in my DLL (NDEBUG) is distroyed in the client application (_DEBUG).
Workarounds i know for now are:
1)Always pasing objects from my dll by using referinces and never by value or smart pointers
2)delevering to the client a dll compiled with _DEBUG
3)asking the client to compile his app with NDEBUG
But i'm looking for understanding what is happening and trying to find a better solution. It's very confusing for me that a macro that was design only to enable and disable Assert functions is actually making the application to crash. Is anybody able to tell me more about this subject?