Marius's Tutorials

Started by
3 comments, last by doit 19 years, 11 months ago
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
Advertisement
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
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]
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
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.

This topic is closed to new replies.

Advertisement