|
From: <or...@vp...> - 2003-07-13 09:32:30
|
Dark Kernel (InacioW-) wrote: > Hi. > I tried to use ddraw.lib from M$-dxtoolkit for C++, > and I got a missing pointer for the DLL, but when I > linked whith libddraw.a instead of the ddraw.lib, > everything went perfect and work as perfect as it > would be. > Would someone mind about explain to me what happened? It is due to different compilers. I don't know DirectX, but if it is C++, then it is related to name mangling. MSVC and GCC mangle names differently, that is mainly why C++ DLLs created by MSVC cannot be used by programs created by GCC, and vice versa. Remember the extern "C" ... stuff? It is needed to disable name mangling. Simple C DLLs and libraries can be used by both GCC and MSVC. Your problem lies in different compilers, that's all. The REAL trouble comes, when the import library is inconsistent with it's DLL. GCC tends to do this fairly often, and it has serious trouble exporting C++ classes. Linking to the import library for me doesn't always work, but when I link to the DLL directly (which luckily, GCC can do), everything is fine. This is odd, but again, this is what we have to live with. -- Greetings, Balázs |