VC++.NET: link sdl-programms

Hi!

I build sdl and sdlmain with VC++.NET 2003, and it worked.
but when i tried to link some sdl-test-programms i got this message (original in german, but i hope i translated it good enough for you):

msvcrt.lib(MSVCR71.dll) : error LNK2005: _fprintf already defined in LIBC.lib(fprintf.obj)
msvcrt.lib(MSVCR71.dll) : error LNK2005: _fclose already defined in LIBC.lib(fclose.obj)
msvcrt.lib(MSVCR71.dll) : error LNK2005: _exitalready defined in LIBC.lib(crt0dat.obj)
msvcrt.lib(MSVCR71.dll) : error LNK2005: _strncpy already defined in LIBC.lib(strncpy.obj)
LIBC.lib(crt0init.obj) : warning LNK4098: standardlibary ‘msvcrt.lib’ ist in conflict with other libaries; use /NODEFAULT:libary
Release/sdltest.exe : fatal error LNK1169: found one or more multiple defined symbols

Ignoring libc.lib or/and msvcrt.lib’ ist not an option, it results in unresolved symbols.
Is seems that the problem resultes from linking against SDLmain.lib, but this is neccessary, without it there is an unresolved symbol _main.
Is this a known problem or does anyone have an idea to solve this problem?
Thanks you for reading.

Bye, Stefan

I think you are making same mistake which I made 2
days ago. Your main function must look like that:
int main(int argc, char *argv[])
If your main doesn’t look like that then this is the
actual problem. Actually it’s an error made in
documentation.

— Stefan_Andre?en <stefan.andressen at web.de> wrote:> Hi!

I build sdl and sdlmain with VC++.NET 2003, and it
worked.
but when i tried to link some sdl-test-programms i
got this message (original in german, but i hope i
translated it good enough for you):

msvcrt.lib(MSVCR71.dll) : error LNK2005: _fprintf
already defined in LIBC.lib(fprintf.obj)
msvcrt.lib(MSVCR71.dll) : error LNK2005: _fclose
already defined in LIBC.lib(fclose.obj)
msvcrt.lib(MSVCR71.dll) : error LNK2005:
_exitalready defined in LIBC.lib(crt0dat.obj)
msvcrt.lib(MSVCR71.dll) : error LNK2005: _strncpy
already defined in LIBC.lib(strncpy.obj)
LIBC.lib(crt0init.obj) : warning LNK4098:
standardlibary ‘msvcrt.lib’ ist in conflict with
other libaries; use /NODEFAULT:libary
Release/sdltest.exe : fatal error LNK1169: found one
or more multiple defined symbols

Ignoring libc.lib or/and msvcrt.lib’ ist not an
option, it results in unresolved symbols.
Is seems that the problem resultes from linking
against SDLmain.lib, but this is neccessary, without
it there is an unresolved symbol _main.
Is this a known problem or does anyone have an idea
to solve this problem?
Thanks you for reading.

Bye, Stefan>


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

=====


Do you Yahoo!?
Win 1 of 4,000 free domain names from Yahoo! Enter now.
http://promotions.yahoo.com/goldrush

Stefan Andre?n wrote:

Hi!

I build sdl and sdlmain with VC++.NET 2003, and it worked.
but when i tried to link some sdl-test-programms i got this message
(original in german, but i hope i translated it good enough for you):

msvcrt.lib(MSVCR71.dll) : error LNK2005: _fprintf already defined in
LIBC.lib(fprintf.obj)
msvcrt.lib(MSVCR71.dll) : error LNK2005: _fclose already defined in
LIBC.lib(fclose.obj)
msvcrt.lib(MSVCR71.dll) : error LNK2005: _exitalready defined in
LIBC.lib(crt0dat.obj)
msvcrt.lib(MSVCR71.dll) : error LNK2005: _strncpy already defined in
LIBC.lib(strncpy.obj)
LIBC.lib(crt0init.obj) : warning LNK4098: standardlibary 'msvcrt.lib’
ist in conflict with other libaries; use /NODEFAULT:libary
Release/sdltest.exe : fatal error LNK1169: found one or more multiple
defined symbols

Ignoring libc.lib or/and msvcrt.lib’ ist not an option, it results in
unresolved symbols.
Is seems that the problem resultes from linking against SDLmain.lib,
but this is neccessary, without it there is an unresolved symbol _main.
Is this a known problem or does anyone have an idea to solve this
problem?
Thanks you for reading.

Bye, Stefan



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

HI!
you should open the DLL_MULTHREAD for the application ;at the project
setting!you can change to that ,then you will success!
hope joy it!
-------------- next part --------------
A non-text attachment was scrubbed…
Name: daixf.vcf
Type: text/x-vcard
Size: 703 bytes
Desc: not available
URL: http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20040823/5bec48fd/attachment.vcf