Mingw native compiling

I’m trying to compile the testgl.c program included in sdl-development archive.
I always get this message:

c:\MINGW\BIN…\lib\gcc-lib\mingw32\2.95.2…/libmingw32.a(main.o)
(.text+0x8d):main.c: undefined reference to `WinMain at 16’
make: *** [testgl] Error 1

I believe I’ve set up mingw correctly. (at least some non-SDL programs compiled
fine)

When linking, did you use the -mwindows flag? If not, try it and it may
solve your problem.

-KarlOn Wednesday March 14 2001 08:33 am, you wrote:

I’m trying to compile the testgl.c program included in sdl-development
archive. I always get this message:

c:\MINGW\BIN…\lib\gcc-lib\mingw32\2.95.2…/libmingw32.a(main.o)
(.text+0x8d):main.c: undefined reference to `WinMain at 16’
make: *** [testgl] Error 1

I believe I’ve set up mingw correctly. (at least some non-SDL programs
compiled fine)

Hi Markku

Markku Strandman wrote

I’m trying to compile the testgl.c program included in sdl-development archive.
I always get this message:

c:\MINGW\BIN…\lib\gcc-lib\mingw32\2.95.2…/libmingw32.a(main.o)
(.text+0x8d):main.c: undefined reference to `WinMain at 16’
make: *** [testgl] Error 1

You must link to libmingw32.a , too.

So try: -lmingw32 -lSDLmain -lSDL -mwindows

cu
Johannes

Be sure to tell the compiler to link with libming32.a (compiler
option -lmingw32) before (!!!) you link with any other library
(-lSDL -lSDLmain) !

Regards,

Sascha

-----Urspr?ngliche Nachricht-----Von: owner-sdl at lokigames.com [mailto:owner-sdl at lokigames.com]Im Auftrag
von Markku Strandman
Gesendet: Mittwoch, 14. M?rz 2001 14:34
An: sdl at mail.lokigames.com
Betreff: [SDL] Mingw native compiling

I’m trying to compile the testgl.c program included in sdl-development
archive.
I always get this message:

c:\MINGW\BIN…\lib\gcc-lib\mingw32\2.95.2…/libmingw32.a(main.o)
(.text+0x8d):main.c: undefined reference to `WinMain at 16’
make: *** [testgl] Error 1

I believe I’ve set up mingw correctly. (at least some non-SDL programs
compiled
fine)