Winelib Program with DLL problem

Kevin Atkinson kevina at
Thu Dec 25 22:16:49 CST 2003

On Fri, 26 Dec 2003, Dmitry Timoshkov wrote:

> "Kevin Atkinson" <kevina at> wrote:
> > That is a heck of a lot of work to link with a DLL that is not compiled 
> > with an exports table.
> I don't understand you. If a DLL exports something (i.e. has a not zero
> export directory in the PE header), then it definitely has an export table.

Sorry.  I mean what it is compiled with a .def file rather than using 

> > Furthermore, when I use an exports table (ie compile with /def in VC++) 
> > mingw has problems linking with the DLL.  It could be that I need to pass 
> > in special options.  Simply including the ".lib" file as a link object is 
> > not enough.
> MinGW (or rather Windows ld port) has its own heuristics for resolving
> symbols in external libraries. So, just stick to rules and read its
> documentation. I have an old dllhelpers-0.2.6.tar.gz addon for MinGW with
> samples how to use DLLs with MinGW, you could find something similar
> on the net.
> I'd say that the key of your problems is a bug in MS linker which exports
> decorated API names. That's similar to an attempt to link against a DLL
> with C++ style decorated exports created by a compiler from another vendor.

If the names are not decorated in that fashion mingw has a problem linking 
with it.  When linked the linker is looking for the names with the 
'@' decoration.

I would hardly call the '@' decoration a bug, it is the way it is done in 
windows.  It is spelled out in the documentation that way.

> > It seams rather strange that wine has so much problems linking with a DLL 
> > not compiled with an exports table.  Am I the first one who attempted 
> > this.
> Probably. Don't forget: Wine is alpha software. Every your contribution
> makes it better, as it has become much better with the help of many other
> people.

Yeah, yeah.  I don't know the least thing about windows linking or how 
to fix wine to make it handle this situation better.  So I guess if I 
don't contribute a patch to handle this it won't get fixed anytime soon.


More information about the wine-devel mailing list