[SDL] compile problem in VC++ 6 Win2k

Adam Gates adam at preston.net
Tue Aug 14 20:28:00 PDT 2001


Create a Win32 application (not a console application) in VC6.
Link to the Multithreaded DLL.
Link to sdl.lib and sdlmain.lib.
Create a 'main' function.
Make sure 'SDL.H' is included in the file which 'main' is in.

Michael Cowart wrote:
> 
> This is probably a stupid newbie question, but I
> couldn't find one just like it in the archives.
> 
> The first time I tried to compile a SDL program, I got
> this error in VC++ 6:
> 
> SDLmain.lib(SDL_main.obj) : error LNK2001: unresolved
> external symbol _SDL_main
> Debug/duh.exe : fatal error LNK1120: 1 unresolved
> externals
> 
> Everything was set right (include directories,
> libraries included in project, DLL file in project
> directory, using multithreaded DLLs).
> 
> I then tried just creating a new c++ file and let VC++
> create a new project when I tried to compile. After
> playing with it some, (set it to not use default
> libraries and manually included msvcrt.dll), I got the
> program to compile correctly. This worked for a few
> compiles, but then, I got the same linker error again.
> Now, no matter what I do, I can't seem to get it to
> work. I even tried a new project, going through the
> same steps, with no results.
> 
> Probably just a newbie problem, but it's driving me
> nuts.
> 
> Thanks,
> Michael Cowart
> 
> __________________________________________________
> Do You Yahoo!?
> Make international calls for as low as $.04/minute with Yahoo! Messenger
> http://phonecard.yahoo.com/
> 
> _______________________________________________
> SDL mailing list
> SDL at libsdl.org
> http://www.libsdl.org/mailman/listinfo/sdl




More information about the SDL mailing list