Archived

This topic is now archived and is closed to further replies.

maruchan

SDL trouble =(

Recommended Posts

maruchan    122
I just downloaded the SDL pack for dev-c++ 4.9.7.0 and i try runninga simple program that only includes the sdl library i get a [Linker error] undefined reference to `WinMain@16'' so i did some searching some people said change main() to SDL_main() and put all these extensions in the linker options and none of them worked.. thanks

Share this post


Link to post
Share on other sites
AnthonyLewis    142
I''ve never used Dev-C++, but it sounds like you need to build a windows app instead of a console app -

add -mwindows to your link line

Leave main as main and link with SDLmain. Also, here are a few links that might be useful to you:

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

http://cone3d.gamedev.net/cgi-bin/index.pl?page=tutorials/gfxsdl/tut1

Tony

Share this post


Link to post
Share on other sites
YoshiN    122
You don''t need to make a windows app, it will work with either window or console (although window is recommended, since you don''t want a window and a console). It sounds like you just didn''t link the SDLmain library.

Share this post


Link to post
Share on other sites