Link error on mingw32

Hi to all,
i’m trying to compile a SDL project with Dev-C++ using libSDLmain.a but it requires (dunno why) the SDLmain.lib
if i include the SDLmain.lib i have this error:

C:\PROGRA~2\DEV-C_~1\Bin\ld.exe: C:\Programmazione\SDLmain.lib(./Release/SDL_main.obj): warning: ignoring duplicate section .text' C:\PROGRA~2\DEV-C_~1\Bin\ld.exe: C:\Programmazione\SDLmain.lib(./Release/SDL_main.obj): warning: ignoring duplicate section.text’
C:\Programmazione\SDLmain.lib(./Release/SDL_main.obj)(.text+0x55):C:\SDL\SDL-1.2: undefined reference to `_alloca_probe’

and if i not include it instead the compiler return this:

C:/DevC++/Lib/\libmingw32.a(main.o)(.text+0x8e):undefined reference to ‘WinMain at 16’

i dunno why, plz somebody help me!!!

Muzero

Hi to all,
i’m trying to compile a SDL project with Dev-C++ using libSDLmain.a but it
requires (dunno why) the SDLmain.lib
if i include the SDLmain.lib i have this error:
[snip]

and if i not include it instead the compiler return this:

C:/DevC++/Lib/\libmingw32.a(main.o)(.text+0x8e):undefined reference to
’WinMain at 16’

Make sure that within your linker command box is (in exactly that order):
-lmingw32 -lSDLmain -lSDL -mwindows

There are some links covering this topic:
http://www.libsdl.org/faq.php?action=listentries&category=4#58

http://docs.deninet.com/sdl_on_dev_c.htm

http://www.google.com/search?hl=en&lr=&q=site%3Awww.libsdl.org+
%22undefined+reference+to+%5C%27WinMain%4016%22&btnG=Google+SearchOn Wednesday 12 June 2002 17:02, Muzero wrote:


Johannes Schmidt

< http://libufo.sourceforge.net > Your widget set for OpenGL