Dynamic library in release does not work

Hi,


I am building a dynamic library from several own static library, and use it a sample program.


When I use the debug version, with None optimisation, it does work very well. But when I try to use the release version my program crashes with an : abort trap: 6


After some research, trying to add : -export_dynamic -all_load ... but no success


At the end I modified the debug configuration, changing the optiisation level of all the built static libraries, to O3 or Os, used during the link of the dynamic lib, and I got the same crash ...


I don't understand very well why ?

If someone has a clue ... 🙂


Thanx in advance.


Gerard

Replies

Well, because it is a code we use as a cross platform thing... I was first guessing some bad compilation settings on my side... but now I think that it is simply some bad behavior of the code when optimized. Classic stuff at the end... some bad initialized memory somewhere :)