SDL error LNK1561: entry point must be defined

Started by
4 comments, last by baruchl 15 years, 8 months ago
Hi folks. Im sure you guys are groaning right now and I dont blame you, because this is another linker error when using SDL. I have trawled the net for hours looking for a remedy to my problem which included looking at all the article here as well. I have tried EVERY suggestion to no avail ( take my word for it.) Funny thing is i used to use C++ 2005 beta with SDL a few weeks ago and i never had a problem, UNTIL i switched over to VC++ 2005 Express. Is there an inherent problem with express and SDL configuration? Anyways here are my code snippets. // #pragma comment(lib, "SDL.lib") #pragma comment(lib, "SDLmain.lib") #pragma comment(lib, "SDL_TTF.lib") #include "C:\SDL_LIB\include\SDL.h" #include "C:\SDL_LIB\TTF\SDL_TTF-2.0.7\include\SDL_ttf.h" #include "defines.h" // int main(int argc, char **argv) // Multithreaded /MD has been set as well as the proper paths in the VC++ directories. Please help me!
Advertisement
Did you try to change the character set to MBCS from Unicode? (Project Properties/General/Character Set)
I got the "entry point not defined once" and (as far as I can remember it) my solution was a little strange--linking SDLmain before SDL did it. I'm not even sure the linking order makes a difference (someone else can confirm) but if it does then that might be it.

I don't remember the whole episode very well now though, so if it doesn't work don't be disappointed. [smile]
I actually got it working. I just recreated a new project with all the required settings, pasted my code and it worked. Very strange indeed.
> SDL error LNK1561: entry point must be defined

I was getting this error as well , but I found out that I did not specify the correct library folder and was getting this error.

Just an FYI !!!!
Hi
I had the same problem. Make sure that your project is a Win32 application (with or without a console). Thats how I fixed the error.

This topic is closed to new replies.

Advertisement