Help with simple winelib dll

Seth Burleigh seth at
Tue Jun 15 21:04:58 CDT 2010

Im attempting to build a dll which a windows program running under wine
can dynamically load. The dll will be a wrapper around a linux library.
In preparation ive tried to follow the instructions here
with a simple example but have not succeeded. Below is the contents of
the files in my directory and the commands i executed. Can anyone help
out? Thanks!

	int MyLinuxFunc(int a,int b) {
 		return a+b;
	int MyLinuxFunc(int,int);
    2 stdcall MyWinFunc (long long) MyProxyWinFunc
	#include <MyLinuxFunc.h>
	#include <windef.h> 
	int WINAPI MyProxyWinFunc (int a,int b)
   	 return MyLinuxFunc(a,b);

winemaker . --nosource-fix --dll --single-target MyWin --nomfc -I"."
-L"." -iMyLinuxFunc

winegcc  -o MyLinuxFunc.o MyWin.o    -L.   -lMyLinuxFunc  
MyWin.o: In function `MyProxyWinFunc':
MyWin.c:(.text+0x20): undefined reference to `MyLinuxFunc'
/usr/lib/wine/libwinecrt0.a(exe_main.o): In function `main':
(.text+0xa0): undefined reference to `WinMain'
collect2: ld returned 1 exit status
winegcc: i486-linux-gnu-gcc failed
make: *** [] Error 2

More information about the wine-devel mailing list