[SDL] Can't use vector push_back with SDL
Glenn McCord
clari_player at paradise.net.nz
Mon Jul 24 03:39:13 PDT 2006
I was dreading someone suggesting that then only way forward was to
compile SDL myself. Assuming my attempt was correct, VS 2005 gives the
following error.
Error 1 fatal error LNK1104: cannot open file 'dxguid.lib' SDL
Yet under Linker -> Command Line -> Additional Dependencies
dxguid.lib appears in the list. I think it doesn't exist on my machine.
After googling some more I've gotten the impression that I have to
download the entire DirectX SDK. My poor dialup connection is going to
have to endure another 170MB unless I can be convinced otherwise.
Glenn
Peter Mulholland wrote:
>Glenn McCord wrote:
>
>
>>I don't know why it wasn't linking to SDLmain before but it is working now.
>>So now I've explicitly linked to the two SDL libraries and removed the
>>two unnecessary headers. However if I go
>>
>>/NODEFAULTLIB:msvcrt.lib at Linker -> Command Line -> Additional Dependencies
>>
>>
>>I go from 2 errors to 22. The first few are
>>
>>
><snip>
>
>First thing to do - compile your own SDLmain, VS2005 has changed things
>quite a bit versus the older compilers that the precompiled binaries
>use. Better still, build your own SDL too. This will minimise CRT
>runtime clashes.
>
>I would just build SDL in release mode, but build SDLmain in both
>release and debug modes. Then, use the appropriate version. The reason
>is that the CRT runtime libs used are different in debug and release
>builds, and the linker will moan if they don't match.
>
>That should make all of the problems go away. It's strange though, why
>you were getting errors using vector::push_back(). That would sound like
>Visual C++ has not automatically linked to the C++ runtime lib. Again,
>compiling your own SDL and SDLmain should stop this.
>
>Pete.
>
>
>_______________________________________________
>SDL mailing list
>SDL at libsdl.org
>http://www.libsdl.org/mailman/listinfo/sdl
>
>
>
>
More information about the SDL
mailing list