Linking against Wine under Linux

Tim Teulings rael at
Wed Feb 18 15:31:26 CST 2004


I'm writing on a software that supports different (GUI) drivers for 
different OSs. "Driver" refferes to my software (GUI library) having 
different plugins (by implementing a subclass of an abstract base class) 
for different OSs. I have an X11 plugin for doing X11 calls on X11, one 
for Mac OS X, one for Curses and one for Windows. I now would like to 
compile the Windows specific classes of my library under Linux using 
Wine. The Windows version does use low level 2D graphics calls (WIN32). 
  This works fine if using f.e. Cygwin as compiler environment under 
Windows (rest of the software is a little bit unix centric).

I now would like to use the Windows driver under Linux but I have a 
problem finding the correct linker call. This is more difficult, since I 
do not use C/C++ directly but another compiler that generates C code 
wich in turn gets compiled using gcc. So I cannot use winemaker, for 
which I found some documentation.

The Windows Version links explictely against kernel32, user32 and gdi32 
DLLs. If I under Linux just leave them away and link only against wine 
(-lwine) I got unresolved symbols during linking for the Win32 API calls.

After that I tried to link against the <windowsdllname> files I 
found (under /usr/libwine, using the Debian testing packages), too, 
since I assume that these contain the functions I use. But I cannot get 
the linker to find them. strace shows that it is always searching for 
lib<windowsdllname> For example it searches for 
while I only have a

Is it correct, that I have to link explictely against this libraries? If 
yes, how can I get the linker to search for the correct names? If no, 
how to get my stuff to link?


More information about the wine-devel mailing list