[Wine] Winelib application linking with non-system Windows DLL - how?
adam.spragg at octaltelecom.co.uk
Wed Feb 24 11:06:40 CST 2010
I'm writing a winelib application, and trying to link with a non-system
Windows DLL to resolve external symbols, and I can't figure out how to do it.
According to the documentation:
"All the libraries you link with should be available as '.so' libraries. If
one of them is available only in '.dll' form then consult Building WineLib
which I think is my case. But "Building WineLib DLLs" says:
"For one reason or another you may find yourself with a Linux library that you
want to use as if it were a Windows Dll."
Uh, that's not what I want at all. I've got a Windows library that is in .dll
form, and I want to link against it. In my Makefile, I've added the paths to
the .lib file, the path to the .dll file, and the name of the DLL to include
in what appear to be the right places from the documentation. Although IMO
the documentation isn't entirely clear on the intended semantics/usage of all
the Makefile variables. For example, in the section describing hello_exe_DLLS,
"The DLLS field is where you would enumerate the list of DLLs that executable
imports. It should contain the full DLL name including the '.dll' extension,
but not the '-l' option."
This is in contrast to the default DLLs that winemaker already included in the
list, which do *not* have the '.dll' extension. Nevertheless, I have tried to
link against the library with and without the '.dll' extension, and it always
My current Makefile is attached.
Note that without trying to link against sapi.dll, I get errors of the form:
sapi-speak.cpp:(.text+0x176): undefined reference to `SPDFID_WaveFormatEx'
If I do try to link against sapi.dll (which contains the above symbol), then
depending on how I try to link it, I get one of:
/usr/bin/ld: cannot find -lsapi
/usr/bin/ld: cannot find -lsapi.dll
Note also the following output from my system:
adam at host:~/.wine/drive_c$ find . -iname sapi.*
./Program Files/Microsoft Speech SDK 5.1/Lib/i386/sapi.lib
./Program Files/Microsoft Speech SDK 5.1/Include/sapi.h
./Program Files/Microsoft Speech SDK 5.1/IDL/sapi.idl
./Program Files/Microsoft Speech SDK 5.1/Docs/Help/sapi.chm
./Program Files/Common Files/Microsoft Shared/Speech/sapi.dll
./Program Files/Common Files/Microsoft Shared/Speech/sapi.sym
./Program Files/Common Files/Microsoft Shared/Speech/sapi.pdb
./Program Files/Common Files/Microsoft Shared/Speech/sapi.cpl
I'm running wine-1.0.1 on Debian "testing" (Squeeze), wine package version
Can anyone figure out where I'm going wrong, and point me to the documentation
I missed that tells me how I'm supposed to be doing this?
Adam Spragg <adam.spragg at octaltelecom.co.uk>
Octal Telecom <http://www.octaltelecom.co.uk/>
It reverses the logical flow of conversation!
> > No.
> > > Should I top post?
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 2726 bytes
Desc: not available
More information about the wine-users