martinsm wrote:This is not true. MinGW supports DllMain just fine.
And MinGW can use .lib files for dll imports that are build by MSVC without problems.
Ha that was the problem, I added teh DLLMain and teh Main and now it does not crashes anymore.
But the dll is about 20 time slower than the window version, and I am usin teh same option that I am using in the Mac and Linux
gcc -c -Wall -Wno-strict-aliasing -D_MINGW_32_VER -msse -m32 -O2 -mtune=pentium4 -march=pentium2 -D_NEWTON_BUILD_DLL -Idg -Iphysics -o dg/dg.o dg/dg.cpp
teh only thing that is diffrent is teh version of GCC which is 4.4.1 here an din linux is 4.3.1 and in Mac is 4.2.0
gcc version 4.4.1 (TDM-1 mingw32)
It is lamost like the options are not doing anything because it is the same speed if I build in with -O0 option
gcc -c -Wall -Wno-strict-aliasing -D_MINGW_32_VER -msse -m32 -O0 -mtune=pentium4 -march=pentium2 -D_NEWTON_BUILD_DLL -Idg -Iphysics -o dg/dg.o dg/dg.cpp