Still won't work... heres the code:
#include "SDL/SDL.h" //EDIT: This is the line with the error message.
int main()
{
//Start SDL
SDL_Init( SDL_INIT_EVERYTHING );
//Quit SDL
SDL_Quit();
return 0;
}
Anything wrong? I'm getting "Build Error".
Thanks.
Can't Get SDL Started!
You have to add these parameters in the main function. int argc, char* args[]
like this:
int main(int argc, char* args[]) {
like this:
int main(int argc, char* args[]) {
Quote:Original post by password
You have to add these parameters in the main function. int argc, char* args[]
like this:
int main(int argc, char* args[]) {
And to elaborate, this is because SDL does some funky #defining and renaming to get itself to work. What happens is that your function "main" is actually renambed to SDL_Main(...).
So, when you don't specify the correct params, SDL won't know what to replace.
The only exclusion is when you compile under linux... IIRC, compiling under linux accepts just "main()".
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement