[SDL] compile problem in VC++ 6 Win2k

Mahmoud Al Gammal mahmoud at algammal.com
Wed Aug 15 02:13:00 PDT 2001


Hi there,
	I had a similar problem once and I've discovered that I didn't set the
main() function to accept arguments. Your main() function prototype must be
int main( int argc, char* argv[] ). I hope this will help you.

Mahmoud Al Gammal

-----Original Message-----
From: sdl-admin at libsdl.org [mailto:sdl-admin at libsdl.org]On Behalf Of Michael
Cowart
Sent: Wednesday, August 15, 2001 6:12 AM
To: sdl at libsdl.org
Subject: [SDL] compile problem in VC++ 6 Win2k

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





More information about the SDL mailing list