MinGW problems

I am trying to compile my game with SDL 1.2.5a and MinGW. It compiles fine
under Linux and VC6.
For phylosophical reasons, I try to have a minimal environment, so I only
installed MinGW, and no MSYS: is it possible?
Here is the command line, and the output: what am I doing wrong

gcc main.c file1.c file2.c file3.c file4.c
sounds.c -g -Wall -ID:\SDL-1.2.5\include\SDL -LD:\SDL-1.2.5\lib -lSDL -lSDLm
ain -lmingw32 -luser32 -lgdi32 -lwinmm -ldxguid -mwindows -o myapp.exe
D:/MINGW/BIN/…/lib/gcc-lib/mingw32/3.2/…/…/…/libmingw32.a(main.o)(.text+
0x7f):main.c: undefined reference to `WinMain at 16’
D:\MINGW\BIN\MINGW3~4.EXE: *** [myapp.exe] Error 1

TIA
Carlo

You need to link with SDL_main or supply your own WinMain entry point
(just call your main())

Lic. Gabriel Gambetta
ARTech - GeneXus Development Team
ggambett at artech.com.uy> ----- Original Message -----

From: Amedeo [mailto:astorni@softhome.net]
Sent: Domingo, 15 de Junio de 2003 04:31 a.m.
To: sdl at libsdl.org
Subject: [SDL] MinGW problems

I am trying to compile my game with SDL 1.2.5a and MinGW. It compiles
fine under Linux and VC6. For phylosophical reasons, I try to have a
minimal environment, so I only installed MinGW, and no MSYS: is it
possible? Here is the command line, and the output: what am I doing
wrong

gcc main.c file1.c file2.c file3.c file4.c
sounds.c -g -Wall -ID:\SDL-1.2.5\include\SDL -LD:\SDL-1.2.5\lib -lSDL
-lSDLm ain -lmingw32 -luser32 -lgdi32 -lwinmm -ldxguid -mwindows -o
myapp.exe
D:/MINGW/BIN/…/lib/gcc-lib/mingw32/3.2/…/…/…/libmingw32.a(main.o)(.t
ext+
0x7f):main.c: undefined reference to `WinMain at 16’
D:\MINGW\BIN\MINGW3~4.EXE: *** [myapp.exe] Error 1

TIA
Carlo


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl