SDL Error
1 2
|
E:\CodeBlocks\SDL\SDL-1.2.15\lib\libSDLmain.a(SDL_win32_main.o):SDL_win32_main.c|| undefined reference to `SDL_main|
||=== Build finished: 1 errors, 0 warnings ===|
|
I keep getting this error. I installed it correctly (checked several videos) and nothing is working. Please help.
Also code from my project:
1 2 3 4 5 6 7
|
#include "game.h"
int main()
{
game shootergame;
return 0;
}
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
|
#ifndef _GAME_H_
#define _GAME_H_
#include <SDL/SDL.h>
//#include "game.cpp"
class game {
public:
game();
bool bisrunning;
void gamerun();
private:
};
game::game() : bisrunning(true) {
}
#endif
|
I believe with SDL you have to use command line arguments in your main function. So try
int main(int argc, char *argv[])
It worked THANK YOU SO MUCH!
BTW Damn you SDL!
Last edited on
Topic archived. No new replies allowed.