Getting VC++6 to work with sdl

Hi List!

I’ve encountered a for me big problem. Using VC++6/win2k I had no problems
compiling sdl.lib and sdlmain.lib
but when I started coding stuff, just to test araound a little bit, I got a
lot of linker errors:

at first: I had to exclude libcmt.lib, cause it conflicted with
msvcrt.lib. After doing this I increased the complexity of my program. I
included iostream.h for ‘cout’. My program compiles fine, but I get about
35 linking-errors. Most have to do with libcimt.lib. Here are the first
two linker-errors (the others look like the second one):
LINK : error LNK2001: unresolved external symbol _mainCRTStartup
libcimt.lib(ostream.obj) : error LNK2001: unresolved external symbol _fflush

my linking options look like this:
"
kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib
shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib sdl.lib
sdlmain.lib /nologo /subsystem:console /incremental:no
/pdb:“Release/sdl_spielerei.pdb” /machine:I386 /nodefaultlib:“libcmt.lib”
/out:“Release/sdl_spielerei.exe”
"
What am I doing wrong?
Thanks in Advance,
St0fF 64.

— St0fF 64 wrote:

Hi List!

I’ve encountered a for me big problem. Using VC++6/win2k I
had no problems
compiling sdl.lib and sdlmain.lib
but when I started coding stuff, just to test araound a little
bit, I got a
lot of linker errors:

at first: I had to exclude libcmt.lib, cause it conflicted
with
msvcrt.lib. After doing this I increased the complexity of my
program. I
included iostream.h for ‘cout’. My program compiles fine, but
I get about
35 linking-errors. Most have to do with libcimt.lib. Here
are the first
two linker-errors (the others look like the second one):
LINK : error LNK2001: unresolved external symbol
_mainCRTStartup
libcimt.lib(ostream.obj) : error LNK2001: unresolved external
symbol _fflush

my linking options look like this:
"
kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib
advapi32.lib
shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib
odbccp32.lib sdl.lib
sdlmain.lib /nologo /subsystem:console /incremental:no
/pdb:“Release/sdl_spielerei.pdb” /machine:I386
/nodefaultlib:“libcmt.lib”
/out:“Release/sdl_spielerei.exe”
"
What am I doing wrong?
Thanks in Advance,
St0fF 64.

I haven’t used VC++ and SDL together, but this site may help you
out: http://www.gamedev.net/reference/programming/features/sdl1/=====
Dave Brondsema
dave at brondsema.net
http://www.brondsema.net


Do You Yahoo!?
Great stuff seeking new owners in Yahoo! Auctions!
http://auctions.yahoo.com

Hey!

at first: I had to exclude libcmt.lib, cause it conflicted with
msvcrt.lib. After doing this I increased the complexity of my program. I
included iostream.h for ‘cout’. My program compiles fine, but I get about
35 linking-errors. Most have to do with libcimt.lib. Here are the first
two linker-errors (the others look like the second one):
LINK : error LNK2001: unresolved external symbol _mainCRTStartup
libcimt.lib(ostream.obj) : error LNK2001: unresolved external symbol
_fflush

this looks like the misstake that all the sdl-newbees make. (me too a few
weeks ago…)
goto (german g)
Projekt/Einstellungen/C C++/Code Generation
and choose "multithreaded dll"
nothing has be excluded.

cu
Stiefel

Could it be you have forgotten to change the project settings to multithreaded dll.
Sometimes I do and get similar errormessages.> I’ve encountered a for me big problem. Using VC++6/win2k I had no problems

compiling sdl.lib and sdlmain.lib
but when I started coding stuff, just to test araound a little bit, I got a
lot of linker errors:

Thanks, I already figured it out, it’s working quite nice … as you’ll
see, I already can give some comments …
St0fF 64
At 11:54 28.01.2002 -0800, you wrote:>— St0fF 64 <@Stefan_Hubner> wrote:

Hi List!

I’ve encountered a for me big problem. Using VC++6/win2k I
had no problems
compiling sdl.lib and sdlmain.lib
but when I started coding stuff, just to test araound a little
bit, I got a
lot of linker errors:

at first: I had to exclude libcmt.lib, cause it conflicted
with
msvcrt.lib. After doing this I increased the complexity of my
program. I
included iostream.h for ‘cout’. My program compiles fine, but
I get about
35 linking-errors. Most have to do with libcimt.lib. Here
are the first
two linker-errors (the others look like the second one):
LINK : error LNK2001: unresolved external symbol
_mainCRTStartup
libcimt.lib(ostream.obj) : error LNK2001: unresolved external
symbol _fflush

my linking options look like this:
"
kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib
advapi32.lib
shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib
odbccp32.lib sdl.lib
sdlmain.lib /nologo /subsystem:console /incremental:no
/pdb:“Release/sdl_spielerei.pdb” /machine:I386
/nodefaultlib:“libcmt.lib”
/out:“Release/sdl_spielerei.exe”
"
What am I doing wrong?
Thanks in Advance,
St0fF 64.

I haven’t used VC++ and SDL together, but this site may help you
out: http://www.gamedev.net/reference/programming/features/sdl1/

=====
Dave Brondsema
dave at brondsema.net
http://www.brondsema.net


Do You Yahoo!?
Great stuff seeking new owners in Yahoo! Auctions!
http://auctions.yahoo.com


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl

Hi,

I have recently been irritated by these kinds of VC++6
configuration problems and have failed to find out how
to set up the defaults.

Idealy I want to choose to create a new “SDL project” but
this seems to be over-complicated (probably just me missing
the obvious).

I have put together a small zip file :

http://www.johnnypops.demon.co.uk/sdl/sdl-dev.zip (12K)

that will create some folders in a place of your choosing
and provides a simple text template that can be easily
edited (global search and replace) to create a convienient
starting point.

It even includes a ‘blank’ application icon in a resource file.

All you have to do is open the new project workspace for the
first time and populate the Source and Header folders.

SDL header, and lib files will be found for both debug
and release modes. As I hate “.PCH” files, these are also
off by default (Hurray!). It creates console applications
so that you can see the messages when lauching from a shell.

Instructions on putting all the files in the right places
the first time are included.

Currently set up to expect ‘sdl.lib’, ‘sdlmain.lib’,
‘sdl_mixer.lib’, and ‘sdl_image.lib’

Hope this wasn’t a waste of bandwidth,

cheers,
John.> ----- Original Message -----

From: johahn@delta.telenordia.se (Johan Hahn)
To:
Sent: Monday, January 28, 2002 10:30 PM
Subject: Re: [SDL] getting VC++6 to work with sdl

Could it be you have forgotten to change the project settings to
multithreaded dll.
Sometimes I do and get similar errormessages.

I’ve encountered a for me big problem. Using VC++6/win2k I had no
problems
compiling sdl.lib and sdlmain.lib
but when I started coding stuff, just to test araound a little bit, I got
a
lot of linker errors:


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl