winegcc and winemaker- a few minor bugs

Steven Edwards steven_ed4153 at yahoo.com
Fri Jun 18 00:35:01 CDT 2004


Hola,
I noticed two minor bugs when porting some sample DirectX code. 

1. MSVC and Borland both allow for

WINAPI WinMain(HINSTANCE hInstance, HINSTANCE, LPSTR, int)

where under winegcc you will get the following error: "winmain.cpp:187:
error: ISO C++ forbids declaration of `WinMain' with no type". If you
change it to:

int APIENTRY WINAPI WinMain(HINSTANCE hInstance, HINSTANCE, LPSTR, int)

Then it will compile fine. So should we work around the incorrectness
of code allowed for by other compilers? Or document the changes that
you will run in to porting C++ from other compilers?

2. Winemaker does not import all of the import libs from the MS_VC
makefile. When building my projects it does not link to ddraw even
though the MS_VC makefile has ddraw.lib in it. So I will get the
following warning on linking:

winmain.o(.text+0xd5): In function `DoModeEnumeration(HWND__*)':
: warning: undefined reference to `DirectDrawCreateEx'

It needs to be a error rather than a warrning. When you try and run the
program of course you get the following:

[steven at steven enummode]# wine enummode.exe.so
wine: could not load L"Z:\\mnt\\src\\tmp\\MSVC\\Chapters 11-15
(DirectDraw_ requires DirectX 7 or 8)\\enummode\\enummode.exe.so":
/steven/.wine/dosdevices/z:/mnt/src/tmp/MSVC/Chapters 11-15
(DirectDraw_ requires DirectX 7 or 8)/enummode/enummode.exe.so:
undefined symbol: DirectDrawCreateEx

So of course adding ddraw to the imports in the Makefile fixes it.

Other then these two bugs, (one of which is the other compilers fault
for allowing bad code) I have had no problems with anything I have
thrown at winemaker and winegcc. Nice work Dimi and Francois!

Thanks
Steven



		
__________________________________
Do you Yahoo!?
Yahoo! Mail Address AutoComplete - You start. We finish.
http://promotions.yahoo.com/new_mail 



More information about the wine-devel mailing list