Mingw32+main

i,ve got this error message with mingw32 what does it mean?

C:\MINGW\GCC-29~1.2\BIN…\lib\gcc-lib\i386-mingw32msvc\2.95.2…\i386-
mingw32msvc\lib\libmingw32.a(main.o)(.text+0x8e): undefined reference to
`WinMai
n at 16’_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.

I had the same error. YOu have to be sure to link the libmngw32.a before (!)
you link the libSDLmain.a and the libSDL.a

CyA

Sascha

-----Urspr?ngliche Nachricht-----Von: owner-sdl at lokigames.com [mailto:owner-sdl at lokigames.com]Im Auftrag
von Mario Portelli
Gesendet: Dienstag, 13. Februar 2001 13:34
An: sdl at mail.lokigames.com
Betreff: [SDL] mingw32+main

i,ve got this error message with mingw32 what does it mean?

C:\MINGW\GCC-29~1.2\BIN…\lib\gcc-lib\i386-mingw32msvc\2.95.2…\i
386-
mingw32msvc\lib\libmingw32.a(main.o)(.text+0x8e): undefined reference to
`WinMai
n at 16’


Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.

My experience is that MingW32 is sensitive to the following:

A normal C++ program always has a main function like …
int main() {}

In MingW32 this should be completed with the END_OF_MAIN() macro
like this …
int main() {}
END_OF_MAIN()

Note that there is no semicolon at the end.

In all cases where I had the same error as you describe, adding
the END_OF_MAIN macro solved it (at least for me).

—8<—

i,ve got this error message with mingw32 what does it mean?

C:\MINGW\GCC-29~1.2\BIN…\lib\gcc-lib\i386-mingw32msvc\2.95.2…\i386-
mingw32msvc\lib\libmingw32.a(main.o)(.text+0x8e): undefined
reference to
`WinMai
n at 16’


Get Your Private, Free E-mail from MSN Hotmail at
http://www.hotmail.com.>