SOLUTION! Link problem on MS VC++6 & .NET

The most idiot solution ever!

remove library sdlmain.lib from import libraries list.
remove all libraries from ignore libraries list.
attach sdl_main.c (from SDL source) into your project (Oh yeah!)
compile!

There is only 9 cast warnings but the program runs of course :wink:

I export this conclusion, after at least 10 compilations of SDL source, and
after many tries to compile my program.
This is not a good solution, but until kids from SDL found a better solution
I give this.--------------------------------

the better result I have before this solution is this:
include libraries sdl.lib sdlmain.lib (nostdio)
ignore libraries msvcrt.lib
take this:

Linking…
sdlmain.lib(SDL_main.obj) : warning LNK4217: locally defined symbol _isspace
imported in function _ParseCommandLine
sdlmain.lib(SDL_main.obj) : warning LNK4217: locally defined symbol __iob
imported in function _ShowError
sdlmain.lib(SDL_main.obj) : warning LNK4217: locally defined symbol _fclose
imported in function _cleanup_output
sdlmain.lib(SDL_main.obj) : warning LNK4217: locally defined symbol _exit
imported in function _main
sdlmain.lib(SDL_main.obj) : warning LNK4217: locally defined symbol _strncpy
imported in function _main
sdlmain.lib(SDL_main.obj) : error LNK2019: unresolved external symbol
__imp__fprintf referenced in function _ShowError
sdlmain.lib(SDL_main.obj) : error LNK2019: unresolved external symbol
__imp__strrchr referenced in function _main
\Debug/main.exe : fatal error LNK1120: 2 unresolved externals

It seems to be a conflict between msvcrt.lib & libcmt.lib
I have this problem a long time ago but I correct it (I dont remember how)

Any suggestions???

I include a piece of code for MS VC++ .NET

Thanks

Linking…
msvcrt.lib(ti_inst.obj) : error LNK2005: “private: __thiscall
type_info::type_info(class type_info const &)” (??0type_info@@AAE at ABV0@@Z)
already defined in LIBCMTD.lib(typinfo.obj)
msvcrt.lib(ti_inst.obj) : error LNK2005: “private: class type_info &
__thiscall type_info::operator=(class type_info const &)”
(??4type_info@@AAEAAV0 at ABV0@@Z) already defined in
LIBCMTD.lib(typinfo.obj)
msvcrt.lib(MSVCR71.dll) : error LNK2005: _exit already defined in
LIBCMTD.lib(crt0dat.obj)
msvcrt.lib(MSVCR71.dll) : error LNK2005: _strncpy already defined in
LIBCMTD.lib(strncpy.obj)
msvcrt.lib(MSVCR71.dll) : error LNK2005: _fclose already defined in
LIBCMTD.lib(fclose.obj)
msvcrt.lib(MSVCR71.dll) : error LNK2005: __isctype already defined in
LIBCMTD.lib(isctype.obj)
LIBCMTD.lib(crt0init.obj) : warning LNK4098: defaultlib 'msvcrt.lib’
conflicts with use of other libs; use /NODEFAULTLIB:library
\Debug/main.exe : fatal error LNK1169: one or more multiply defined
symbols
found
Build log was saved at
"file://c:\document???\c++\Gessoid
2\Debug\BuildLog.htm"
main - 7 error(s), 1 warning(s)

<- Chameleon -> wrote:

The most idiot solution ever!

remove library sdlmain.lib from import libraries list.
remove all libraries from ignore libraries list.
attach sdl_main.c (from SDL source) into your project (Oh yeah!)
compile!

There is only 9 cast warnings but the program runs of course :wink:

I export this conclusion, after at least 10 compilations of SDL source, and
after many tries to compile my program.
This is not a good solution, but until kids from SDL found a better solution
I give this.


Cool, thanks!

Tyler