Sorry to bother,
I’ve been using SDL 1.1.4 with VC++5 under Win98. Everything
worked fine. I upgraded to 1.1.6, and now I cannot compile any project
anymore. When I try to compile I get:
--------------------Configuration: new4 - Win32 Debug--------------------
Compiling…
main.cpp
Linking…
msvcrt.lib(MSVCRT.dll) : error LNK2005: _exit already defined in
LIBCMT.lib(crt0dat.obj)
msvcrt.lib(MSVCRT.dll) : error LNK2005: _strncpy already defined in
LIBCMT.lib(strncpy.obj)
msvcrt.lib(MSVCRT.dll) : error LNK2005: _fclose already defined in
LIBCMT.lib(fclose.obj)
LIBCMT.lib(crt0init.obj) : warning LNK4098: defaultlib "msvcrt.lib"
conflicts with use of other libs; use /NODEFAULTLIB:library
Debug/new4.exe : fatal error LNK1169: one or more multiply defined symbols
found
Error executing link.exe.
new4.exe - 4 error(s), 1 warning(s)
Using /NODEFAULTLIB:… does not change the situation.
The source here’s a very simple one (the one in Vc++.txt)
#include “SDL.h”
int main( int argc, char* argv[] )
{
// Body of the program goes here.
return 0;
}
Does anyone know what’s the matter? Thanks.__
Fabio " ‘- nowDruid " Franchello
—’---------
— @Fabio_SnowDruid_Fran —
Change your project settings to Debug Multithreaded in all
configurations and those errors should go away.
Fabio ‘SnowDruid’ Franchello wrote:> Sorry to bother,
I've been using SDL 1.1.4 with VC++5 under Win98. Everything
worked fine. I upgraded to 1.1.6, and now I cannot compile any project
anymore. When I try to compile I get:
--------------------Configuration: new4 - Win32 Debug--------------------
Compiling…
main.cpp
Linking…
msvcrt.lib(MSVCRT.dll) : error LNK2005: _exit already defined in
LIBCMT.lib(crt0dat.obj)
msvcrt.lib(MSVCRT.dll) : error LNK2005: _strncpy already defined in
LIBCMT.lib(strncpy.obj)
msvcrt.lib(MSVCRT.dll) : error LNK2005: _fclose already defined in
LIBCMT.lib(fclose.obj)
LIBCMT.lib(crt0init.obj) : warning LNK4098: defaultlib "msvcrt.lib"
conflicts with use of other libs; use /NODEFAULTLIB:library
Debug/new4.exe : fatal error LNK1169: one or more multiply defined symbols
found
Error executing link.exe.
new4.exe - 4 error(s), 1 warning(s)
Using /NODEFAULTLIB:… does not change the situation.
The source here’s a very simple one (the one in Vc++.txt)
#include “SDL.h”
int main( int argc, char* argv[] )
{
// Body of the program goes here.
return 0;
}
Does anyone know what’s the matter? Thanks.
__
Fabio " '- nowDruid " Franchello
---'---------
--- snowdruid at tiscalinet.it ---
At 01.30 04/01/01 +0000, you wrote:
Change your project settings to Debug Multithreaded in all
configurations and those errors should go away.
Unfortunately no. I was using Debug Multithreaded in all
configurations also when working with 1.1.4.
Thanks anyway,__
Fabio " ‘- nowDruid " Franchello
—’---------
— @Fabio_SnowDruid_Fran —
Did you specifically try Multithreaded “DLL” (I’m sorry if I forgot to
mention that earlier), that error almost always indicated a conflict
between what SDL was built with and what your program was built with.
Fabio ‘SnowDruid’ Franchello wrote:> At 01.30 04/01/01 +0000, you wrote:
Change your project settings to Debug Multithreaded in all
configurations and those errors should go away.
Unfortunately no. I was using Debug Multithreaded in all
configurations also when working with 1.1.4.
Thanks anyway,
__
Fabio " '- nowDruid " Franchello
---'---------
--- snowdruid at tiscalinet.it ---
At 02.25 04/01/01 +0000, you wrote:
Did you specifically try Multithreaded “DLL” (I’m sorry if I forgot to
mention that earlier), that error almost always indicated a conflict
between what SDL was built with and what your program was built with.
When changing to Debug Multithreaded DLL or Multithreaded DLL the
error becomes:
--------------------Configuration: foo - Win32 Debug--------------------
Compiling…
main.cpp
C:\Code\foo\main.cpp(11) : error C2561: ‘SDL_main’ : function must return a
value
Error executing cl.exe.
foo.exe - 1 error(s), 0 warning(s)
I always used Debug Multithreaded or Multithreaded with 1.1.4-, so
I wasn’t aware of the change. Thanks.__
Fabio " ‘- nowDruid " Franchello
—’---------
— @Fabio_SnowDruid_Fran —
Well, i use a linker switch /FORCE:MULTIPLE (with Multithread static lib)
and it helps for me.
This of course is very ugly workaround, but it works.
Kovacs> ----- Original Message -----
From: snowdruid@tiscalinet.it (Fabio ‘SnowDruid’ Franchello)
To:
Sent: ceturtdiena, 2001. gada 4. janvaris 11:59
Subject: Re: [SDL] Re: [Newbie] SDL 1.1.4 VS 1.1.6 with VC++5
At 02.25 04/01/01 +0000, you wrote:
Did you specifically try Multithreaded “DLL” (I’m sorry if I forgot to
mention that earlier), that error almost always indicated a conflict
between what SDL was built with and what your program was built with.
When changing to Debug Multithreaded DLL or Multithreaded DLL the
error becomes:
--------------------Configuration: foo - Win32 Debug--------------------
Compiling…
main.cpp
C:\Code\foo\main.cpp(11) : error C2561: ‘SDL_main’ : function must return
a
value
Error executing cl.exe.
foo.exe - 1 error(s), 0 warning(s)
I always used Debug Multithreaded or Multithreaded with 1.1.4-, so
I wasn’t aware of the change. Thanks.
__
Fabio " '- nowDruid " Franchello
---'---------
--- snowdruid at tiscalinet.it ---
I think SDL is pretty picky about what main is, is your main declared
like:
int main(int argc, char *argv[])
Even if you don’t use the command line arguments this is proper form.>
When changing to Debug Multithreaded DLL or Multithreaded DLL the
error becomes:
--------------------Configuration: foo - Win32 Debug--------------------
Compiling…
main.cpp
C:\Code\foo\main.cpp(11) : error C2561: ‘SDL_main’ : function must return a
value
Error executing cl.exe.
foo.exe - 1 error(s), 0 warning(s)
I always used Debug Multithreaded or Multithreaded with 1.1.4-, so
I wasn’t aware of the change. Thanks.
__
Fabio " '- nowDruid " Franchello
---'---------
--- snowdruid at tiscalinet.it ---
Ignore my other message, just put a return(0); at the end of main
somewhere.
Fabio ‘SnowDruid’ Franchello wrote:> At 02.25 04/01/01 +0000, you wrote:
Did you specifically try Multithreaded “DLL” (I’m sorry if I forgot to
mention that earlier), that error almost always indicated a conflict
between what SDL was built with and what your program was built with.
When changing to Debug Multithreaded DLL or Multithreaded DLL the
error becomes:
--------------------Configuration: foo - Win32 Debug--------------------
Compiling…
main.cpp
C:\Code\foo\main.cpp(11) : error C2561: ‘SDL_main’ : function must return a
value
Error executing cl.exe.
foo.exe - 1 error(s), 0 warning(s)
I always used Debug Multithreaded or Multithreaded with 1.1.4-, so
I wasn’t aware of the change. Thanks.
__
Fabio " '- nowDruid " Franchello
---'---------
--- snowdruid at tiscalinet.it ---