[SDL] Why is it that SDL won't work with a console application?

Christophe Cavalaria chris.cavalaria at free.fr
Sun May 6 16:26:38 PDT 2007


Manuel García Cabrera wrote:

> SkunkGuru escribió:
>> Manuel García Cabrera ha scritto:
>>> Whenever I include SDL.h on a Win32 console application I get the
>>> following error:
>>> IBCD.lib(crt0.obj) : error LNK2001: unresolved external symbol _main
>>> Debug/MyProject.exe : fatal error LNK1120: 1 unresolved externals
>> 
>> 
>> How did you write your main ?
>> You must write like this :
>> 
>> int main( int argc, char **argv )
>> 
>> (with argc and argv arguments)
>> 
>> 
> It's not working... Can anyone try to compile this:
> 
> 
> #include <sdl.h>
> 
> int main(int argc, char **argv){
> return 0;
> }
> 
> 
> Please, I know it seems stupid, but try to compile that with Visual C++
> 6. I can't do it!

There's a header called SDL_main.h that you could try to include, especially
if you use the SDL_main lib.




More information about the SDL mailing list