How to use wine to load windows dll files ?

Gregory Hosler ghosler at
Mon Aug 18 00:02:52 CDT 2008

Hash: SHA1

Hi All,

I'm a developer of an open source project that needs to load some windows dlls
for conversion routines.

Specifically, I'm the lead developer of GyachI

a Yahoo Messenger client.

In GyachI, in order to support speech in chat rooms, we make use of the window
dll codec files (supplied by the end user) to do the necessary codec

At the present moment, we copied mplayer's method of loading the dll files. That
is to say that we have some very old wine code in our source tree. It works, but
as and when a user runs GyachI on a box with wine installed, then GyachI will
run against the installed wine libraries instead of the inbuilt wine code (not
sure how, but this seems to be the case, from several reports).

Since the code that we're using is all wine code, and in fact it is in the wine
libraries, I would like to purge the wine code out of our project tree, and just
compile/link against the necessary wine header files / wine libraries. To that
extent, I have been able to remove the wine code from a build tree, and using
the wine header files, I can get my code to compile. However, when I go to link,
I get a number of undefined symbols.

Some of the undefined symbols (at link time) are:

	undefined reference to `CloseDriver'
	undefined reference to `CodecAlloc'
	undefined reference to `CodecRelease'
	undefined reference to `export_names'
	undefined reference to `GetProcAddress'
	undefined reference to `HeapAlloc'
	undefined reference to `HeapFree'
	undefined reference to `OpenDriverA'
	undefined reference to `SendDriverMessage'
	undefined reference to `__vprintf'

Upon investigation, I've discovered that many of the routines that I'm linking
against are not in, but instead, they are in other libraries. e.g.
/usr/lib/wine/, /usr/lib/wine/, and a few others.

I would like to know how to link to and make use of these routines in the
respective wine libraries. I'm willing to write any stub code that might need to
be written, but I cannot find any documentation of what needs to be done.

Any suggestions, pointers, links, urls, etc., would be most appreciated. Code
samples (e.g. from other projects doing what I'm trying to do) would also be
much appreciated. :)

Many thanks, and best rgds,

- -Greg

- --

Please also check the log file at "/dev/null" for additional information.
                (from /var/log/Xorg.setup.log)

| Greg Hosler                                   ghosler at    |
Version: GnuPG v1.4.7 (GNU/Linux)
Comment: Using GnuPG with Fedora -


More information about the wine-devel mailing list