Does SDL can work with VC7?

I created a simple SDL application on vs2003.net, Whatever I use sdL VC6 or VC8, when linked the application, it will generate error LNK2019: unresolved external symbol _main referenced in function _mainCRTStartup.

Does SDL can work with VC7 ?How can it do?

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

I think this is your problem:
http://www.libsdl.org/faq.php?action=listentries&category=7#55

Try linking with SDLmain.

kundi schrieb:

I created a simple SDL application on vs2003.net, Whatever I use sdL VC6
or VC8, when linked the application, it will generate error LNK2019:
unresolved external symbol _main referenced in function _mainCRTStartup.

Does SDL can work with VC7 ?How can it do?


Christoph Nelles

E-Mail : @Christoph_Nelles
Jabber : eazrael at evilazrael.net ICQ : 78819723

PGP-Key : ID 0x424FB55B on subkeys.pgp.net
or http://evilazrael.net/pgp.txt

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkrA1lIACgkQBcR1PkJPtVvylgCfdkWBhBJ3CXSMQ7Y61qZFqOwc
MbwAnisBPtCPO5JiL1L5zVaiK81Zg6Ty
=wYet
-----END PGP SIGNATURE-----

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi again,

damn google… just googled for SDLmain and got Mac OS :wink:
http://www.libsdl.org/faq.php?action=listentries&category=4#48

You have a normal main function in your code?

kundi schrieb:

I created a simple SDL application on vs2003.net, Whatever I use sdL VC6
or VC8, when linked the application, it will generate error LNK2019:
unresolved external symbol _main referenced in function _mainCRTStartup.

Does SDL can work with VC7 ?How can it do?


Christoph Nelles

E-Mail : @Christoph_Nelles
Jabber : eazrael at evilazrael.net ICQ : 78819723

PGP-Key : ID 0x424FB55B on subkeys.pgp.net
or http://evilazrael.net/pgp.txt

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkrA1rkACgkQBcR1PkJPtVss4gCgsJ3G4t/zAe1J+4QlT2NIQ2Mg
8XsAniE9yhexktt7z1DiyIocAr8/8V4G
=M5WP
-----END PGP SIGNATURE-----

Yep, except for SDL 1.2 with Visual C++ it’s SDLmain.libOn Mon, Sep 28, 2009 at 8:29 AM, Christoph Nelles wrote:

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

I think this is your problem:
http://www.libsdl.org/faq.php?action=listentries&category=7#55

Try linking with SDLmain.

kundi schrieb:

I created a simple SDL application on vs2003.net, Whatever I use sdL VC6
or VC8, when linked the application, it will generate error LNK2019:
unresolved external symbol _main referenced in function _mainCRTStartup.

Does SDL can work with VC7 ?How can it do?


Christoph Nelles

E-Mail ? ?: evilazrael at evilazrael.de
Jabber ? ?: eazrael at evilazrael.net ? ? ?ICQ ? ? ? : 78819723

PGP-Key ? : ID 0x424FB55B on subkeys.pgp.net
? ? ? ? ? ?or http://evilazrael.net/pgp.txt

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkrA1lIACgkQBcR1PkJPtVvylgCfdkWBhBJ3CXSMQ7Y61qZFqOwc
MbwAnisBPtCPO5JiL1L5zVaiK81Zg6Ty
=wYet
-----END PGP SIGNATURE-----


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


-Sam Lantinga, Founder and President, Galaxy Gameworks LLC

When I did it according to the suggestion mentioned in http://www.libsdl.org/faq.php?action=listentries&category=7#55.

I generate another Link error as below:

msvcrt.lib(MSVCR71.dll) : error LNK2005: _exit already defined in LIBCD.lib(crt0dat.obj)
msvcrt.lib(MSVCR71.dll) : error LNK2005: _fclose already defined in LIBCD.lib(fclose.obj)
msvcrt.lib(MSVCR71.dll) : error LNK2005: __isctype already defined in LIBCD.lib(isctype.obj)

How it happened ?

This is a C library mismatch. Make sure all projects you link to are
using the same C runtime library. (It’s listed under Code Generation
in the project properties)On Mon, Sep 28, 2009 at 8:47 PM, kundi <jiangjkd at 163.com> wrote:

When I did it according to the suggestion mentioned in
http://www.libsdl.org/faq.php?action=listentries&category=7#55.

I generate another Link error as below:

msvcrt.lib(MSVCR71.dll) : error LNK2005: _exit already defined in
LIBCD.lib(crt0dat.obj)
msvcrt.lib(MSVCR71.dll) : error LNK2005: _fclose already defined in
LIBCD.lib(fclose.obj)
msvcrt.lib(MSVCR71.dll) : error LNK2005: __isctype already defined in
LIBCD.lib(isctype.obj)

How it happened ?


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


-Sam Lantinga, Founder and President, Galaxy Gameworks LLC