I’ve been getting this error while trying to compile an SDL appilication.
I do not think it is an SDL error, as I have read and followed two SDL
tutorials to the letter. I have already done as much googling as I can
(an hour and a half), read all the faqs, and searched the forums and my
searches reveal nothing. I have set my Linker options to
-lmingw32 -lSDLmain -lSDL
without the -lmingw32, it gives “undefined reference to winmain at 16” With
it, it gives “undefined reference to SDL_main” It seems to me that I am
linking against a library with that very name. If you can help me, I’d
much appreciate it.
Here is my(very short) code:
#include
#include <SDL\SDL.h>
using namespace std;
int main()
{
/* if (SDL_Init(SDL_INIT_VIDEO) != 0)
{
cout<<"SDL: "<<SDL_GetError()<<endl;
exit(-1);
}
atexit(SDL_Quit);
*/
system(“PAUSE”);
return 0;
}
You can see that at this point I’ve cut out everything: I’m just trying to link
against SDL at this point.
Please help me.