From: Luke D. <cod...@ho...> - 2004-02-06 16:10:46
|
If the linker is searching for undecorated names, then the function is not declared as stdcall. Double check the preprocessor conditionals that affect whether stdcall is used, and if necessary compile with "-E" to see the preprocessor output and check for sure whether stdcall is used. If you can't figure it out, show us the declaration of apr_app_initialize and the relevant #defines and typedefs, along with the compile and link commands. Luke ----- Original Message ----- From: "Vicent Seguí Pascual" <vs...@pi...> To: <min...@li...> Sent: Friday, February 06, 2004 11:30 PM Subject: [Mingw-users] Re: MingW and VisualC++ DLL's > Hi, > > >Have you tried the simplest commands?: > > > >pexports libapr.dll > libapr.def > >dlltool --input-def libapr.def -l libapr.a > Yes, I've tried this, but when it can't resolve references corrrectly at link time. > The problem seems to be that libapr.dll exports names in decorated form (eg. _apr_app_initialize@12) > but mingw tries to resolve the name undecorated (eg: apr_app_initialize) even if it is prototyped to > search it in decorated form (that is, declared as __declspec(dllimport) type __stdcall) > If I use an undecorated def, then I can link perfectly but I cannot execute because at run time it cannot find > the apr_app_initialize function in libapr.dll. The workaround this issue has been to relink the libapr.dll > with an udecorated def file in VC and then do the simple commands you have listed. However I would really > like to avoid the use of VC. |