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/
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
I did all that. Win32 (not console),multithreaded
DLLs, main function, added sdl.lib and sdlmain.lib to
project(not just copied to directory),added include
directory.
The program actually DID compile a few times without
any problems. I was working through some of the
example code, and after about 4 rebuilds, the linker
error came back. That’s what I don’t understand. Now,
I can’t get anything to compile (new project, followed
same procedure that made the first one work, I even
tried restarting VC). I truly have no clue.
Mike
— Adam Gates wrote:> 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
SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl
Do You Yahoo!?
Make international calls for as low as $.04/minute with Yahoo! Messenger
http://phonecard.yahoo.com/
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
Make sure that you include “SDL.h” in the file containing
main() and that you declare it like so:
int main(int argc, char *argv[])
See ya,
-Sam Lantinga, Software Engineer, Blizzard Entertainment
Oops… argv is ALWAYS a double pointer…I feel
REALLY stupid. I guees I need more sleep =)
At least it isn’t as bad as getting DirectX running =)
Thanks
Mike
— Sam Lantinga 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
Make sure that you include “SDL.h” in the file
containing
main() and that you declare it like so:
int main(int argc, char *argv[])
See ya,
-Sam Lantinga, Software Engineer, Blizzard
Entertainment
SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl
Do You Yahoo!?
Make international calls for as low as $.04/minute with Yahoo! Messenger
http://phonecard.yahoo.com/
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@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