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

Manuel García Cabrera manugarciac5 at yahoo.com.ar
Sun May 6 16:50:56 PDT 2007


Christophe Cavalaria escribió:
> 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.
> 
> 
> _______________________________________________
> SDL mailing list
> SDL at lists.libsdl.org
> http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
Nope... Not working.


More information about the SDL mailing list