Linking problem (Debug vs. Release)

When I bulid DEBUG x64 there is such a problem:

1>Linking…
1>LIBCMTD.lib(dbgheap.obj) : error LNK2005: _heap_alloc already defined in LIBCMT.lib(malloc.obj)
1>LIBCMTD.lib(dbgheap.obj) : error LNK2005: _recalloc already defined in LIBCMT.lib(recalloc.obj)
1>LIBCMTD.lib(dbgheap.obj) : error LNK2005: _msize already defined in LIBCMT.lib(msize.obj)
1>LIBCMTD.lib(dbghook.obj) : error LNK2005: __crt_debugger_hook already defined in LIBCMT.lib(dbghook.obj)
1>LIBCMTD.lib(isctype.obj) : error LNK2005: _isctype_l already defined in LIBCMT.lib(isctype.obj)
1>LIBCMTD.lib(isctype.obj) : error LNK2005: _isctype already defined in LIBCMT.lib(isctype.obj)
1>LINK : warning LNK4098: defaultlib ‘LIBCMT’ conflicts with use of other libs; use /NODEFAULTLIB:library
1>LINK : warning LNK4098: defaultlib ‘LIBCMTD’ conflicts with use of other libs; use /NODEFAULTLIB:library

When I build RELEASE x64 there is not such a problem.

Any ideas what may occur?

Y.

Right click your project properties and go to: Configuration Properties | C/C++ | Code generation and

check the Runtime library property. Probably you have a mismatch there.

eyal

Right click your project properties and go to: Configuration Properties | C/C++ | Code generation and

check the Runtime library property. Probably you have a mismatch there.

eyal

should there be : Both (/RTC1, equiv. to /RTCsu) or Default for Debug? (btw none of them solved the problem)

should there be : Both (/RTC1, equiv. to /RTCsu) or Default for Debug? (btw none of them solved the problem)

The “Both” and “Default” are properties of the “Basic runtime checks” I was refering to the “Runtime Library” parameter.

In anycase you should make sure that all your libs/dlls/exe are using the same method.

The “Both” and “Default” are properties of the “Basic runtime checks” I was refering to the “Runtime Library” parameter.

In anycase you should make sure that all your libs/dlls/exe are using the same method.

I have the same problem. I have checked the runtime library parameter, it is set to Multi-thread DLL debug. I have tried every other setting with no success. If I ignore certain libraries or standard libraries alltogether I get unresolved external symbols errors. It seems like either I link too many libraries and get multiple definitions or too few and I get unresolved externals.

Any ideas on how to solve this ?

Thank you.