Compiler Problems


#1

Ok I got juce to compile on my desktop but now I’m getting LIBCMT.lib(setlocal.obj) : error LNK2005: __configthreadlocale already defined in MSVCRT.lib(MSVCR80.dll) LIBCMT.lib(free.obj) : error LNK2005: _free already defined in MSVCRT.lib(MSVCR80.dll) LIBCMT.lib(invarg.obj) : error LNK2005: __invoke_watson already defined in MSVCRT.lib(MSVCR80.dll) LIBCMT.lib(tolower.obj) : error LNK2005: _tolower already defined in MSVCRT.lib(MSVCR80.dll) LIBCMT.lib(crt0dat.obj) : error LNK2005: __amsg_exit already defined in MSVCRT.lib(MSVCR80.dll) LIBCMT.lib(crt0dat.obj) : error LNK2005: __initterm_e already defined in MSVCRT.lib(MSVCR80.dll) LIBCMT.lib(crt0dat.obj) : error LNK2005: _exit already defined in MSVCRT.lib(MSVCR80.dll) LIBCMT.lib(crt0dat.obj) : error LNK2005: __exit already defined in MSVCRT.lib(MSVCR80.dll) LIBCMT.lib(crt0dat.obj) : error LNK2005: __cexit already defined in MSVCRT.lib(MSVCR80.dll) LIBCMT.lib(strftime.obj) : error LNK2005: _strftime already defined in MSVCRT.lib(MSVCR80.dll) LIBCMT.lib(hooks.obj) : error LNK2005: "void __cdecl terminate(void)" (?terminate@@YAXXZ) already defined in MSVCRT.lib(MSVCR80.dll) LIBCMT.lib(winxfltr.obj) : error LNK2005: __XcptFilter already defined in MSVCRT.lib(MSVCR80.dll) LIBCMT.lib(_wctype.obj) : error LNK2005: _iswalpha already defined in MSVCRT.lib(MSVCR80.dll) LIBCMT.lib(_wctype.obj) : error LNK2005: _iswspace already defined in MSVCRT.lib(MSVCR80.dll) LIBCMT.lib(_wctype.obj) : error LNK2005: _iswalnum already defined in MSVCRT.lib(MSVCR80.dll) LIBCMT.lib(fpinit.obj) : error LNK2005: __fltused already defined in MSVCRT.lib(dllsupp.obj) LIBCMT.lib(fpinit.obj) : error LNK2005: __ldused already defined in MSVCRT.lib(dllsupp.obj) LIBCMT.lib(crt0init.obj) : error LNK2005: ___xi_a already defined in MSVCRT.lib(cinitexe.obj) LIBCMT.lib(crt0init.obj) : error LNK2005: ___xi_z already defined in MSVCRT.lib(cinitexe.obj) LIBCMT.lib(crt0init.obj) : error LNK2005: ___xc_a already defined in MSVCRT.lib(cinitexe.obj) LIBCMT.lib(crt0init.obj) : error LNK2005: ___xc_z already defined in MSVCRT.lib(cinitexe.obj) LIBCMT.lib(purevirt.obj) : error LNK2005: __purecall already defined in MSVCRT.lib(MSVCR80.dll) LIBCMT.lib(tzset.obj) : error LNK2005: __tzset already defined in MSVCRT.lib(MSVCR80.dll) LIBCMT.lib(atox.obj) : error LNK2005: _atoi already defined in MSVCRT.lib(MSVCR80.dll) LIBCMT.lib(atox.obj) : error LNK2005: __atoi64 already defined in MSVCRT.lib(MSVCR80.dll) LIBCMT.lib(errmode.obj) : error LNK2005: ___set_app_type already defined in MSVCRT.lib(MSVCR80.dll) LIBCMT.lib(abort.obj) : error LNK2005: _abort already defined in MSVCRT.lib(MSVCR80.dll) LIBCMT.lib(timeset.obj) : error LNK2005: ___tzname already defined in MSVCRT.lib(MSVCR80.dll) LIBCMT.lib(getenv.obj) : error LNK2005: _getenv already defined in MSVCRT.lib(MSVCR80.dll) LINK : warning LNK4098: defaultlib 'MSVCRT' conflicts with use of other libs; use /NODEFAULTLIB:library LINK : warning LNK4098: defaultlib 'LIBCMT' conflicts with use of other libs; use /NODEFAULTLIB:library LIBCMT.lib(crt0.obj) : error LNK2001: unresolved external symbol _main

when compiling the example project…

any ideas?


#2

Must be something to do with the c runtime libraries - maybe try turning on the ‘ignore default libraries’ option?


#3

hmmm… i can’t seem to find this option. i’m using visual c++ express beta 2. it works fine on my laptop with beta 1 :?


#4

You are using the runtime in DLL (MSVCRT) and you should probably use the static linked version (LIBCMT)

goto project>properties->c/+c++/code generation/runtime library and select Multithreaded instead of multithreaded DLL


#5

that did it :shock:… thanks! :smiley:


#6

Cheers.

(I’m pretty sure the “how to build” readme mentions this)


#7