I am getting LNK2005 Error when i try to compile juce


#1

i got LNK2005 error when i tried to compile JUCE with Visual studio 2005 ?
it seems it is realted with CRT and MFC libraries.But how can i solve that?
i tried the disable default libraries with /NODEFAULTLIB but.this didn’t solve the problem

full error is below

----- Build started: Project: Juce deneme, Configuration: Debug Win32 ------
Linking…
LIBCMTD.lib(invarg.obj) : error LNK2005: __invoke_watson already defined in MSVCRTD.lib(MSVCR80D.dll)
LIBCMTD.lib(setlocal.obj) : error LNK2005: __configthreadlocale already defined in MSVCRTD.lib(MSVCR80D.dll)
LIBCMTD.lib(tidtable.obj) : error LNK2005: __encode_pointer already defined in MSVCRTD.lib(MSVCR80D.dll)
LIBCMTD.lib(tidtable.obj) : error LNK2005: __decode_pointer already defined in MSVCRTD.lib(MSVCR80D.dll)
LIBCMTD.lib(dbgheap.obj) : error LNK2005: _malloc already defined in MSVCRTD.lib(MSVCR80D.dll)
LIBCMTD.lib(dbgheap.obj) : error LNK2005: __malloc_dbg already defined in MSVCRTD.lib(MSVCR80D.dll)
LIBCMTD.lib(dbgheap.obj) : error LNK2005: __calloc_dbg already defined in MSVCRTD.lib(MSVCR80D.dll)
LIBCMTD.lib(dbgheap.obj) : error LNK2005: __realloc_dbg already defined in MSVCRTD.lib(MSVCR80D.dll)
LIBCMTD.lib(dbgheap.obj) : error LNK2005: _free already defined in MSVCRTD.lib(MSVCR80D.dll)
LIBCMTD.lib(dbgheap.obj) : error LNK2005: __free_dbg already defined in MSVCRTD.lib(MSVCR80D.dll)
LIBCMTD.lib(dbgheap.obj) : error LNK2005: __CrtSetDbgFlag already defined in MSVCRTD.lib(MSVCR80D.dll)
LIBCMTD.lib(dbgheap.obj) : error LNK2005: __CrtDumpMemoryLeaks already defined in MSVCRTD.lib(MSVCR80D.dll)
LIBCMTD.lib(dbgheap.obj) : error LNK2005: __CrtSetCheckCount already defined in MSVCRTD.lib(MSVCR80D.dll)
LIBCMTD.lib(crt0dat.obj) : error LNK2005: _exit already defined in MSVCRTD.lib(MSVCR80D.dll)
LIBCMTD.lib(crt0dat.obj) : error LNK2005: __exit already defined in MSVCRTD.lib(MSVCR80D.dll)
LIBCMTD.lib(crt0dat.obj) : error LNK2005: __cexit already defined in MSVCRTD.lib(MSVCR80D.dll)
LIBCMTD.lib(crt0dat.obj) : error LNK2005: __amsg_exit already defined in MSVCRTD.lib(MSVCR80D.dll)
LIBCMTD.lib(crt0dat.obj) : error LNK2005: __initterm_e already defined in MSVCRTD.lib(MSVCR80D.dll)
LIBCMTD.lib(mlock.obj) : error LNK2005: __lock already defined in MSVCRTD.lib(MSVCR80D.dll)
LIBCMTD.lib(mlock.obj) : error LNK2005: __unlock already defined in MSVCRTD.lib(MSVCR80D.dll)
LIBCMTD.lib(winxfltr.obj) : error LNK2005: __XcptFilter already defined in MSVCRTD.lib(MSVCR80D.dll)
LIBCMTD.lib(dbghook.obj) : error LNK2005: __crt_debugger_hook already defined in MSVCRTD.lib(MSVCR80D.dll)
LIBCMTD.lib(sprintf.obj) : error LNK2005: _sprintf already defined in MSVCRTD.lib(MSVCR80D.dll)
LIBCMTD.lib(crt0init.obj) : error LNK2005: ___xi_a already defined in MSVCRTD.lib(cinitexe.obj)
LIBCMTD.lib(crt0init.obj) : error LNK2005: ___xi_z already defined in MSVCRTD.lib(cinitexe.obj)
LIBCMTD.lib(crt0init.obj) : error LNK2005: ___xc_a already defined in MSVCRTD.lib(cinitexe.obj)
LIBCMTD.lib(crt0init.obj) : error LNK2005: ___xc_z already defined in MSVCRTD.lib(cinitexe.obj)
LIBCMTD.lib(hooks.obj) : error LNK2005: “void __cdecl terminate(void)” (?terminate@@YAXXZ) already defined in MSVCRTD.lib(MSVCR80D.dll)
LIBCMTD.lib(_wctype.obj) : error LNK2005: _iswalpha already defined in MSVCRTD.lib(MSVCR80D.dll)
LIBCMTD.lib(_wctype.obj) : error LNK2005: _iswspace already defined in MSVCRTD.lib(MSVCR80D.dll)
LIBCMTD.lib(_wctype.obj) : error LNK2005: _iswalnum already defined in MSVCRTD.lib(MSVCR80D.dll)
LIBCMTD.lib(tzset.obj) : error LNK2005: __tzset already defined in MSVCRTD.lib(MSVCR80D.dll)
LIBCMTD.lib(errmode.obj) : error LNK2005: ___set_app_type already defined in MSVCRTD.lib(MSVCR80D.dll)
LIBCMTD.lib(getenv.obj) : error LNK2005: _getenv already defined in MSVCRTD.lib(MSVCR80D.dll)
LIBCMTD.lib(timeset.obj) : error LNK2005: ___tzname already defined in MSVCRTD.lib(MSVCR80D.dll)
LIBCMTD.lib(tolower.obj) : error LNK2005: _tolower already defined in MSVCRTD.lib(MSVCR80D.dll)
LIBCMTD.lib(mbstowcs.obj) : error LNK2005: _mbstowcs already defined in MSVCRTD.lib(MSVCR80D.dll)
LIBCMTD.lib(dbgrptw.obj) : error LNK2005: __CrtDbgReportW already defined in MSVCRTD.lib(MSVCR80D.dll)
LIBCMTD.lib(wcstombs.obj) : error LNK2005: _wcstombs already defined in MSVCRTD.lib(MSVCR80D.dll)
LIBCMTD.lib(ismbbyte.obj) : error LNK2005: __ismbblead already defined in MSVCRTD.lib(MSVCR80D.dll)
LIBCMTD.lib(_file.obj) : error LNK2005: ___iob_func already defined in MSVCRTD.lib(MSVCR80D.dll)
LIBCMTD.lib(fflush.obj) : error LNK2005: _fflush already defined in MSVCRTD.lib(MSVCR80D.dll)
LINK : warning LNK4098: defaultlib ‘MSVCRTD’ conflicts with use of other libs; use /NODEFAULTLIB:library
LINK : warning LNK4098: defaultlib ‘LIBCMTD’ conflicts with use of other libs; use /NODEFAULTLIB:library
LIBCMTD.lib(crt0.obj) : error LNK2019: unresolved external symbol _main referenced in function ___tmainCRTStartup
D:\TONY TEMP\JUCE\juce_1_21\JUCE deneme\Juce deneme\Debug\Juce deneme.exe : fatal error LNK1120: 1 unresolved externals
Build log was saved at "file://d:\TONY TEMP\JUCE\juce_1_21\JUCE deneme\Juce deneme\Juce deneme\Debug\BuildLog.htm"
Juce deneme - 44 error(s), 2 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========


#2

change the run time library option to Multi-Threaded (/MT)


#3