Can't build STK on VC9

Can't build STK on VC9

Postby jlpcesar » 19 Aug 2010, 21:14

Hi people!

I hope this is the right place to post this... :/

I've got issues when trying to compile SuperTuxKart.

I work on VC9 (Visual C++ 2008) on Vista.

The errors I get are:
{l Code}: {l Select All Code}
1>LIBCMTD.lib(dbgheap.obj) : error LNK2005: __aligned_malloc already defined in MSVCRTD.lib(MSVCR90D.dll)
1>LIBCMTD.lib(dbgheap.obj) : error LNK2005: __aligned_free already defined in MSVCRTD.lib(MSVCR90D.dll)
1>LIBCMTD.lib(dbgheap.obj) : error LNK2005: __CrtSetCheckCount already defined in MSVCRTD.lib(MSVCR90D.dll)
1>LIBCMTD.lib(tolower.obj) : error LNK2005: _tolower already defined in MSVCRTD.lib(MSVCR90D.dll)
1>LIBCMTD.lib(setlocal.obj) : error LNK2005: __configthreadlocale already defined in MSVCRTD.lib(MSVCR90D.dll)
1>LIBCMTD.lib(setlocal.obj) : error LNK2005: _setlocale already defined in MSVCRTD.lib(MSVCR90D.dll)
1>LIBCMTD.lib(tidtable.obj) : error LNK2005: __encode_pointer already defined in MSVCRTD.lib(MSVCR90D.dll)
1>LIBCMTD.lib(tidtable.obj) : error LNK2005: __decode_pointer already defined in MSVCRTD.lib(MSVCR90D.dll)
1>LIBCMTD.lib(dbghook.obj) : error LNK2005: __crt_debugger_hook already defined in MSVCRTD.lib(MSVCR90D.dll)
1>LIBCMTD.lib(sprintf.obj) : error LNK2005: _sprintf already defined in MSVCRTD.lib(MSVCR90D.dll)
1>LIBCMTD.lib(crt0dat.obj) : error LNK2005: _exit already defined in MSVCRTD.lib(MSVCR90D.dll)
1>LIBCMTD.lib(crt0dat.obj) : error LNK2005: __exit already defined in MSVCRTD.lib(MSVCR90D.dll)
1>LIBCMTD.lib(crt0dat.obj) : error LNK2005: __cexit already defined in MSVCRTD.lib(MSVCR90D.dll)
1>LIBCMTD.lib(crt0dat.obj) : error LNK2005: __amsg_exit already defined in MSVCRTD.lib(MSVCR90D.dll)
1>LIBCMTD.lib(crt0dat.obj) : error LNK2005: __initterm_e already defined in MSVCRTD.lib(MSVCR90D.dll)
1>LIBCMTD.lib(mlock.obj) : error LNK2005: __lock already defined in MSVCRTD.lib(MSVCR90D.dll)
1>LIBCMTD.lib(mlock.obj) : error LNK2005: __unlock already defined in MSVCRTD.lib(MSVCR90D.dll)
1>LIBCMTD.lib(winxfltr.obj) : error LNK2005: __XcptFilter already defined in MSVCRTD.lib(MSVCR90D.dll)
1>LIBCMTD.lib(dosmap.obj) : error LNK2005: __errno already defined in MSVCRTD.lib(MSVCR90D.dll)
1>LIBCMTD.lib(vsprintf.obj) : error LNK2005: _vsprintf already defined in MSVCRTD.lib(MSVCR90D.dll)
1>LIBCMTD.lib(crt0init.obj) : error LNK2005: ___xi_a already defined in MSVCRTD.lib(cinitexe.obj)
1>LIBCMTD.lib(crt0init.obj) : error LNK2005: ___xi_z already defined in MSVCRTD.lib(cinitexe.obj)
1>LIBCMTD.lib(crt0init.obj) : error LNK2005: ___xc_a already defined in MSVCRTD.lib(cinitexe.obj)
1>LIBCMTD.lib(crt0init.obj) : error LNK2005: ___xc_z already defined in MSVCRTD.lib(cinitexe.obj)
1>LIBCMTD.lib(hooks.obj) : error LNK2005: "void __cdecl terminate(void)" (?terminate@@YAXXZ) already defined in MSVCRTD.lib(MSVCR90D.dll)
1>LIBCMTD.lib(invarg.obj) : error LNK2005: __invalid_parameter already defined in MSVCRTD.lib(MSVCR90D.dll)
1>LIBCMTD.lib(invarg.obj) : error LNK2005: __invoke_watson already defined in MSVCRTD.lib(MSVCR90D.dll)
1>LIBCMTD.lib(atox.obj) : error LNK2005: _atoi already defined in MSVCRTD.lib(MSVCR90D.dll)
1>LIBCMTD.lib(crt0.obj) : error LNK2005: _mainCRTStartup already defined in MSVCRTD.lib(crtexe.obj)
1>LIBCMTD.lib(errmode.obj) : error LNK2005: ___set_app_type already defined in MSVCRTD.lib(MSVCR90D.dll)
1>LIBCMTD.lib(dbgrptw.obj) : error LNK2005: __CrtDbgReportW already defined in MSVCRTD.lib(MSVCR90D.dll)
1>LIBCMTD.lib(printf.obj) : error LNK2005: _printf already defined in MSVCRTD.lib(MSVCR90D.dll)
1>LIBCMTD.lib(getenv.obj) : error LNK2005: _getenv already defined in MSVCRTD.lib(MSVCR90D.dll)
1>LIBCMTD.lib(strtol.obj) : error LNK2005: _strtol already defined in MSVCRTD.lib(MSVCR90D.dll)
1>LIBCMTD.lib(_file.obj) : error LNK2005: ___iob_func already defined in MSVCRTD.lib(MSVCR90D.dll)
1>LIBCMTD.lib(fflush.obj) : error LNK2005: _fflush already defined in MSVCRTD.lib(MSVCR90D.dll)
1>LINK : warning LNK4098: defaultlib 'MSVCRTD' conflicts with use of other libs; use /NODEFAULTLIB:library
1>LINK : warning LNK4098: defaultlib 'LIBCMTD' conflicts with use of other libs; use /NODEFAULTLIB:library
1>LINK : warning LNK4098: defaultlib 'MSVCRT' conflicts with use of other libs; use /NODEFAULTLIB:library
1>./../../../supertuxkart_d.exe : fatal error LNK1169: one or more multiply defined symbols found



I saw on some forum that it was due to the Runtime Library. I then changed the latter from "Multi-threaded Debug DLL" to "Multi-threaded Debug". The errors I then got were:
{l Code}: {l Select All Code}
1>MSVCRTD.lib(MSVCR90D.dll) : error LNK2005: __wassert already defined in LIBCMTD.lib(wassert.obj)
1>MSVCRTD.lib(MSVCR90D.dll) : error LNK2005: __aligned_malloc already defined in LIBCMTD.lib(dbgheap.obj)
1>MSVCRTD.lib(MSVCR90D.dll) : error LNK2005: __aligned_free already defined in LIBCMTD.lib(dbgheap.obj)
1>MSVCRTD.lib(MSVCR90D.dll) : error LNK2005: _sprintf already defined in LIBCMTD.lib(sprintf.obj)
1>MSVCRTD.lib(MSVCR90D.dll) : error LNK2005: _printf already defined in LIBCMTD.lib(printf.obj)
1>MSVCRTD.lib(MSVCR90D.dll) : error LNK2005: _strncpy already defined in LIBCMTD.lib(strncpy.obj)
1>MSVCRTD.lib(MSVCR90D.dll) : error LNK2005: _perror already defined in LIBCMTD.lib(perror.obj)
1>MSVCRTD.lib(MSVCR90D.dll) : error LNK2005: _abort already defined in LIBCMTD.lib(abort.obj)
1>MSVCRTD.lib(ti_inst.obj) : error LNK2005: "private: __thiscall type_info::type_info(class type_info const &)" (??0type_info@@AAE@ABV0@@Z) already defined in LIBCMTD.lib(typinfo.obj)
1>MSVCRTD.lib(ti_inst.obj) : error LNK2005: "private: class type_info & __thiscall type_info::operator=(class type_info const &)" (??4type_info@@AAEAAV0@ABV0@@Z) already defined in LIBCMTD.lib(typinfo.obj)
1>MSVCRTD.lib(MSVCR90D.dll) : error LNK2005: _isspace already defined in LIBCMTD.lib(_ctype.obj)
1>MSVCRTD.lib(MSVCR90D.dll) : error LNK2005: _fprintf already defined in LIBCMTD.lib(fprintf.obj)
1>MSVCRTD.lib(MSVCR90D.dll) : error LNK2005: ___iob_func already defined in LIBCMTD.lib(_file.obj)
1>MSVCRTD.lib(MSVCR90D.dll) : error LNK2005: _fopen already defined in LIBCMTD.lib(fopen.obj)
1>MSVCRTD.lib(MSVCR90D.dll) : error LNK2005: _fgetc already defined in LIBCMTD.lib(fgetc.obj)
1>MSVCRTD.lib(MSVCR90D.dll) : error LNK2005: _fclose already defined in LIBCMTD.lib(fclose.obj)
1>MSVCRTD.lib(MSVCR90D.dll) : error LNK2005: _setvbuf already defined in LIBCMTD.lib(setvbuf.obj)
1>MSVCRTD.lib(MSVCR90D.dll) : error LNK2005: _freopen already defined in LIBCMTD.lib(freopen.obj)
1>MSVCRTD.lib(MSVCR90D.dll) : error LNK2005: _exit already defined in LIBCMTD.lib(crt0dat.obj)
1>MSVCRTD.lib(MSVCR90D.dll) : error LNK2005: _strrchr already defined in LIBCMTD.lib(strrchr.obj)
1>MSVCRTD.lib(MSVCR90D.dll) : error LNK2005: _atoi already defined in LIBCMTD.lib(atox.obj)
1>LINK : warning LNK4098: defaultlib 'MSVCRTD' conflicts with use of other libs; use /NODEFAULTLIB:library
1>LINK : warning LNK4098: defaultlib 'MSVCRT' conflicts with use of other libs; use /NODEFAULTLIB:library
1>./../../../supertuxkart_d.exe : fatal error LNK1169: one or more multiply defined symbols found



What could I do to solve that problem?...
jlpcesar
 
Posts: 2
Joined: 19 Aug 2010, 21:12

Re: Can't build STK on VC9

Postby hiker » 20 Aug 2010, 02:19

jlpcesar {l Wrote}:Hi people!

I hope this is the right place to post this... :/

Yes, it is :)

I've got issues when trying to compile SuperTuxKart.

I work on VC9 (Visual C++ 2008) on Vista.

The errors I get are:

...
Are you using our dependency package (and our project file, and the debug target)? Your problems are most likely caused by using incompatible library versions.

Cheers,
Joerg
hiker
 
Posts: 1435
Joined: 07 Dec 2009, 12:15
Location: Melbourne, Australia

Re: Can't build STK on VC9

Postby jlpcesar » 21 Aug 2010, 11:04

I finally managed to build the whole solution!

I was indeed using the dependencies package you provide but the problem was actually due to the fact that I had compiled the PLIB library in Debug mode when it should obviously have been done in Release mode... :/

I'm really new to C++ and still have to learn a lot about how it all works! ;D

So, everything is fine now. And can build and run it with no problems.

Thank you very well for your quick reply anyway.

I am trying to use some BCI (Brain-Computer Interface) technology into SuperTuxKart as part of my MSc dissertation. I am not quite sure about how it is exactly going to fit in the game but it will involve the use of attention and meditation data from the brain to trigger some events in the game. Those events could be things like accelerating, levitating (I saw a Flyable class that could be useful if applicable to PlayerKart objects), or maybe throwing the bubblegum/plunger for instance. So I still have to decide on those actions.

So let me know if you have some great ideas! ;D

Thanks again for your help,

Cheers,

Julien.
jlpcesar
 
Posts: 2
Joined: 19 Aug 2010, 21:12

Re: Can't build STK on VC9

Postby hiker » 21 Aug 2010, 13:17

jlpcesar {l Wrote}:I finally managed to build the whole solution!

I was indeed using the dependencies package you provide but the problem was actually due to the fact that I had compiled the PLIB library in Debug mode when it should obviously have been done in Release mode... :/

plib? So you are building an 0.6.* version? Gee, I didn't expect that - the reason that there is no plib in the dependency package is that we don't use it in current development anymore. With the dependency package there is no need to compile anything yourself (except stk of course). Perhaps we should have left the old package around :)


I'm really new to C++ and still have to learn a lot about how it all works! ;D

Good luck then - if you have any questions please ask, but be aware that our trunk is significantly different from 0.6* by now.

So, everything is fine now. And can build and run it with no problems.

Thank you very well for your quick reply anyway.

Glad that the issue is solved.

I am trying to use some BCI (Brain-Computer Interface) technology into SuperTuxKart as part of my MSc dissertation. I am not quite sure about how it is exactly going to fit in the game but it will involve the use of attention and meditation data from the brain to trigger some events in the game. Those events could be things like accelerating,

I admit that I don't know much about brain trigger interfaces. Obvious choices would be steering I'd say.

levitating (I saw a Flyable class that could be useful if applicable to PlayerKart objects), or maybe throwing the bubblegum/plunger for instance. So I still have to decide on those actions.

No, flyable is not used for karts, only for items like cakes, plungers etc. If steering is too complicated, you could perhaps re-implement jumping (the code is afaik still there, just #ifdef''ed out).

Cheers,
Joerg
hiker
 
Posts: 1435
Joined: 07 Dec 2009, 12:15
Location: Melbourne, Australia

Who is online

Users browsing this forum: No registered users and 1 guest