I am trying to follow the instructions here (http://www.winehq.org/docs/winelib-guide/bindlls-wrapper) to build a dll with wine that i can load dynamically in a windows wine application. this is what i am doing: MyWinDll.spec Code: 2 stdcall MyWinFunc (int) MyProxyWinFunc MyWin.c Code: #include <windef.h> short MyProxyWinFunc(int *i) { return 5; } shell Code: winemaker --nosource-fix --dll --single-target MyWin --nomfc . make I get the following error: Code: /usr/lib/wine/libwinecrt0.a(exe_main.o): In function `main': (.text+0xa9): undefined reference to `WinMain' Why is it asking for a main function, i am trying to build a dll...
tinku99 wrote:> winemaker --nosource-fix --dll --single-target MyWin --nomfcYou should use gcc & winegcc instead. Winemaker is for converting MSVC project files into Makefiles.
vitamin wrote:> > tinku99 wrote: > > winemaker --nosource-fix --dll --single-target MyWin --nomfc > > You should use gcc & winegcc instead. Winemaker is for converting MSVC project files into Makefiles.Thanks for the hint, I played with winegcc and got it to work. Code: winegcc -shared MyWin.c MyWin.dll.spec Then I applied what works with winegcc to the makefile, and it works that way also... Code:> winemaker --nosource-fix --dll --single-target MyWin --nomfc .// add the following to the generated makefile MyWin_C_SRCS = MyWin.c \ MyWin.dll.spec MyWin_LDFLAGS = -shared // then> makeWho do I request to update the documentation (http://www.winehq.org/docs/winelib-guide/bindlls-spec)?
vitamin wrote:> You should use gcc & winegcc instead. Winemaker is for converting MSVC project files into Makefiles.Really? My reading of the documentation was winemaker makes some assumptions based on the files in the directory, but does not know how to translate msvc project files directly. I just ran winemaker in a directory with nothing but a .vcproj file. The resultant Makefile is just a stub, has no useful information in it.