Archived

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

doit

Marius's Tutorials

Recommended Posts

Ive tried lesson one of his sdl gfx tutorials, I get the usual Linker Error undefined reference to ''WinMain()16'' the tutorial can be found here. http://cone3d.gamedev.net/cgi-bin/index.pl?page=tutorials/gfxsdl/tut1 :S

Share this post


Link to post
Share on other sites
Is your project set up as a Windows project?
Did you include SDL.h properly?
Are you linking to SDLmain.lib and SDL.lib?
Did you use the correct signature for main()?

Answer those and maybe someone can help you. BTW, I do realize that the tutorial covers all of those steps, but those are also the most likely to give you your current problem.

-Auron

Share this post


Link to post
Share on other sites
Yes, its setup'ed as a windows project, (console application actually, as said in the tutorial)

ive correctly included SDL.h, linked the two SDLmain.lib and SDL.ib too with the parameter -lminGW32 -ISDLmain ISDL

for the main, this is what i used

int SDL_main( int argc, char ** argv )

I could upload the project that i made to make things clearer.

[edited by - doit on May 20, 2004 11:17:25 AM]

Share this post


Link to post
Share on other sites
If you''ve setup a windows app then its looking for winmain entry point which SDL_main doesn''t use from what i remember, change it to console app

Share this post


Link to post
Share on other sites
You can use SDL in a Windows (Win32) app instead of a console app - just don''t link to SDLmain.lib and declare your main as int WINAPI WinMain(blah...) instead of int main(blah...) and you should be fine.

Share this post


Link to post
Share on other sites