Re: MinGW - dll and exe linking problems - can'tlinkstdcall function without decoration

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Re: MinGW - dll and exe linking problems - can'tlinkstdcall function without decoration

Brian Dessent
Àëåêñàíäð Ìàðòûíîâ wrote:

> 1) In dll names are undecorated (without @X), whence dlltool knows
> about what X it must put after @?

The .def file needs the stdcall-decorated names.

> I think dlltool creates import library in with names in the return necessary
> to me a direction: FunctionInDll@0 -> FunctionInDll, isn't it?

Right, using dlltool -k with a .def file that contains decorated names
will create an import library with the correct aliases, that will link
the compiler-generated decorated names to the undecorated names exported
by the DLL.  The entire w32api uses this technique as all the Win32 APIs
are undecorated stdcall.

Earnie Boyd wrote:

> FYI, linking directly to the DLL also works.  You don't need an import
> library.

No, this is one of the situations were you need an import library.

Brian

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
MinGW-users mailing list
[hidden email]

You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users