From: <vs...@pi...> - 2004-02-05 09:22:46
|
Hello, I'm trying hard to use APR binary compiled dor VC++ from a MINGW project. So far I have two problems: a) If I follow the standard instructions that come from MINGW, I compile perfectly, but I can't link. The Instructions I follow are the following $ pexports.exe libapr.dll | sed "s/^_//" > libapr.def $ dlltool -U -k --input-def libapr.def --dllname libapr.dll -l libapr.a Then I compile using -l libapr.a, But MINGW still complains about inexisting references at link time. However, if I further process the def file, like this: $ pexports.exe libapr.dll | sed "s/^_//" | sed "s/\\ <at> [0-9][0-9]//" | sed "s/\\ <at> [0-9]//"> libapr.def # removes ending <at> 's $ dlltool -U -k --input-def libapr.def --dllname libapr.dll -l libapr.a I link perfectly, but fail miserably at runtime with message about not finding apr_app_initialize in libapr.dll. If I ommit the "-U" in dlltool, then it still bails out with the same message but a prepending underscore: cannot find _apr_app_initialize in libapr.dll. So far, the only way I've found to make APR work is to use the instructions found at http://mywebpage.netscape.com/yongweiwu/stdcall.htm, but in order to follow them I had to use MS VC++ and download the APR source. What I would need is not to use the Source code neither MSVC++,, but be able to import directly from the dll. Thanks, V. Seguí p.d.: I'm extremely new to MINGW and APR on WIN32, sorry if this has already been sorted out, but I can't seem to find any reference on this |