From: Michael G. <mg...@te...> - 2004-08-24 21:20:03
|
> 1) I am trying to port the DemoGL (http://www.sd.nl/demogl) framework to > mingw. The .lib file is formatted for M$VC. So I need to regenerate the > libxxx.a file. A couple of days ago this was discussed already. The thread was about "JNI problem". FYC I've copied the IMO most relevant answer into this email: You need to convert the jvm.lib to gcc's .a format. =A0Use the 'reimp' tool= from http://mywebpage.netscape.com/yongweiwu/, link against the converted library and everything will work. > 3) I used the pexports utility to generate the libDemoGL_Dll.def and > obtained something strange (full file hereunder) >=20 > pexports \winnt\system32\DemoGL_Dll > > C:\Dev-Cpp\demogl_sdk_v131\Lib\DemoGL_Dll.def >=20 > ?DEMOGL_AppEnd@@YAXXZ > ?DEMOGL_AppRun@@YAHQAUHINSTANCE__@@PBUSStartupDat@@PBD_NEEH@Z > ?DEMOGL_ConsoleLogLine@@YAX_NPBD@Z > ?DEMOGL_ConsoleLogLineV@@YAX_NPBDZZ These are decorated names. I don't know wether that's what you want but for gcc/mingw it should work. But then mingw/gcc should be able to create the libxxx.a directly. More precisely it should be able to link against the dll directly (the dll was created using gcc/mingw, wasn't ?? If not then the above decorated names most certainly won't work for mingw/gcc anyway). > 6) Now I did something strange. > I built a .def file based on the errors at the output of the > linker (full file hereunder). > And rebuild the project. > It gives now less errors (ie some functions are now resolved) That is not really surprising. You can create an importlib with whatever name you wish by applying that method. The only remaining problem is that the runtime linker needs to be able to resolve the references... > In fact only the ones in relation with CEffect:: > I suppose this is due to the fact that CEffect is an object > class (the only class of the project) and that it should be handled in > another way. A couple of weeks ago there was a discussion about interfacing COM with mingw. I no longer recall the details so you better search the archives. > 8) Could someone point me in the right direction? Thank you in advance > for your help. To help you further I'd need to know more about what the DemoGL framework is and which compiler did create the libs you try to interface. *IF* it was MSVC _AND_ the libs do export a C++ ABI (not API) then you are out of luck unless you have a MSVC somewhere available because C++ ABI is incompatible among compilers (as of today). Best, Michael =2D-=20 Vote against SPAM - see http://www.politik-digital.de/spam/ Michael Gerdau email: mg...@te... GPG-keys available on request or at public keyserver |