From: Gunter G. <gg...@gm...> - 2004-09-17 16:04:06
|
Hello I am trying to solve a problem occuring during linking FreeImage.dll which is compiled wich VC to a programm compiled with gcc using mingw. To easy it a little bit I wrote a small test application and a test-dll. I compiled the test-dll using VC to mimic the problem. The functions in my test-dll were first exportet __cdecl and all went fine. But after I changed the calling convention to __stdcall nothing linked again. I always followed the way mentioned in the FAQ how to prepare a dll to use it with mingw. First I executed pexports and removed the leading "_" in front of the symbols retrived. Than I used this ".def" file to generate a ".a" file usable for the g++ compiler using libtool. Every time the compiler complains about a unresolved symbol '_imp__libfuncA@4..... (the function name is: __declspec( dllexport) void __stdcall libfuncA(char * buffer); ) and so on. So I used nm do take a look into the ".lib" file coresponding to the dll (compiled using vc6) and into my generated ".a" file. In both files the unresolved symbol is listed as __imp__libfuncA@4 with two underscores in front. So I tried to find some information in the internet with no result. Now I am asking you if anyboby knows such a problem and how to solve it. The only hint I found was, taht _imp_ is the new convention and __imp is the new one. So why dose the dlltool generates still .a files using the old style while gcc unsing the new one ? Best regards Gunter -- NEU: GMX ProMail mit bestem Virenschutz http://www.gmx.net/de/go/mail +++ Empfehlung der Redaktion +++ Internet Professionell 10/04 +++ |