[SDL] Visual Studio 6, C++, SDL

Damien Mascre damienmascre at free.fr
Wed Aug 1 12:56:00 PDT 2001


hello,

I have a similar problem under vc6...

I start a workspace, then a project, I add the SDL lib files as described in
the mini how to.. but vc tells me to check "ignoe default libraries"
in project settings while I compile... but then, the linker shows errors
that only disappear when I add msvcrt.lib to the project files.

I am using pure C (aka .c files extension.. perhaps vc makes any difference)

any ideas ??

thanks.



> -----Message d'origine-----
> De : sdl-admin at libsdl.org [mailto:sdl-admin at libsdl.org]De la part de
> Brad LaFountain
> Envoye : lundi 30 juillet 2001 17:12
> A : sdl at libsdl.org
> Objet : [SDL] Visual Studio 6, C++, SDL
>
>
> Ok,
>
> I am trying to compile a sdl program at the same time im trying to use
> Visual C's standard c++ libary.
>
> eg.
>
> #include "SDL.h"
> #include <iostream.h>
>
> int main(int argc,char **argv)
> {
> 	cout << "hello";
> 	return 0;
> }
>
>
> well to get a sdl program to compile i need to go into project
> properties and
> ignore default properties, link agains msvcrt.lib sdlmain.lib and sdl.lib.
> Well when i add the c++ calls it gives me errors like
>
> main.obj : error LNK2001: unresolved external symbol "public:
> class ostream
> & __thiscall ostream::operator<<(char const *)"
> (??6ostream@@QAEAAV0 at PBD@Z)
> main.obj : error LNK2001: unresolved external symbol "class
> ostream_withassign  cout" (?cout@@3Vostream_withassign@@A)
> main.obj : error LNK2001: unresolved external symbol "public:
> class ostream
> & __thiscall ostream::operator<<(unsigned char)" (??6ostream@@QAEAAV0 at E@Z)
> main.obj : error LNK2001: unresolved external symbol "public:
> class ostream
> & __thiscall
> ostream::flush(void)" (?flush at ostream@@QAEAAV1 at XZ)
>
> Because im not linking agains thoes libaries. Well when i start
> adding the
> c++ libaries
> back to the project then i get some conflicting libaries.
> like:
>
> LIBCD.lib(crt0dat.obj) : error LNK2005: _exit already defined in
> msvcrt.lib(MSVCRT.dll)
> LIBCD.lib(crt0dat.obj) : error LNK2005: __exit already defined in
> msvcrt.lib(MSVCRT.dll)
> LIBCD.lib(crt0init.obj) : error LNK2005: ___xc_z already defined in
> msvcrt.lib(cinitexe.obj)
> LIBCD.lib(crt0init.obj) : error LNK2005: ___xc_a already defined in
> msvcrt.lib(cinitexe.obj)
> LIBCD.lib(crt0init.obj) : error LNK2005: ___xi_z already defined in
> msvcrt.lib(cinitexe.obj)
> LIBCD.lib(crt0init.obj) : error LNK2005: ___xi_a already defined in
> msvcrt.lib(cinitexe.obj)
> LIBCD.lib(winxfltr.obj) : error LNK2005: __XcptFilter already defined in
> msvcrt.lib(MSVCRT.dll)
> msvcrt.lib(MSVCRT.dll) : error LNK2005: _strncpy already defined in
> LIBCD.lib(strncpy.obj)
> msvcrt.lib(MSVCRT.dll) : error LNK2005: _fclose already defined in
> LIBCD.lib(fclose.obj)
> msvcrt.lib(MSVCRT.dll) : error LNK2005: __isctype already defined in
> LIBCD.lib(isctype.obj)
>
>
> Has anyone ever gotten c++ calls to compile with sdl nicely?
>
>
> thanks
> Brad LaFountain
>
>
> _______________________________________________
> SDL mailing list
> SDL at libsdl.org
> http://www.libsdl.org/mailman/listinfo/sdl
>





More information about the SDL mailing list