From: Kalman B. <kal...@gm...> - 2005-06-25 10:08:43
|
Hi! Maybe I didn't understand it properly and I'm trying the wrong way... here is the problem. I've got a dll and have no import library for MinGW with it. No problem, I created one using the dlltool. The problem is that the DLL exports names without the @nn decoration (which is quite usual). All the functions are __stdcall, so GCC generates @nn decorated names im my object files. This way my import library contains names without @nn decoration, my object files contains @nn decorated names. If I understood it right this shouldn't be a problem because the linker makes automatic stdcall fixups (if it doesnt find the name with @nn decoration, it will simply link it with the name without decoration generating only a warning) and everything should be ok. My problem is that it doesn't happen. The linker always states something like this: object.o : source.c : undefined reference to `functionname@nn' Am I doing something wrong?=20 If I add the @nn decorations manually to the .def file, everything's fine. But why does the automatic stdcall fixup not work for me? By the way, is there any need for the import library? You can give the .dll itself to the linker. If the export names are matching, the link will be sucessfuly done, isn't it? Is there any benefit from creating the import library (except that you can fully control wheter you want to link by ordinals or export names etc.) Thank you! Kalman |