Visual Studio 2010, Intel Compiler version 220.127.116.11.
This problem occurs in debug builds.
If /debug:parallel is set, pdbxinst.lib is included. It has a defaultlib directive pointing to libcpmt. If any module compiled with _DEBUG set uses libcpmt, a LNK2038 error results for _ITERATOR_DEBUG_LEVEL.
The workaround of /NODEFAULTLIB:libcpmt.lib when linkingseems to work, but has unknown side effects.
Either a debug version of pdbxinst.lib that links to libcpmtd.lib should be supplied and used in this case, or the dependency on libcpmt needs removing.
What's the reason for building with /debug:parallel? This option is for creating parallel debug checks used by the Intel Parallel Debugger Extension to detect data sharing events in OpenMP* parallelized code.
As said, /debug:parallel is for data sharing detection of multithreaded OpenMP code only. So even if you are debugging OpenMP you don't necessarily need /debug:parallel. For looking after memory problems the Intel Parallel Inspector may help. I doesn't look like you want to detect data races here (the Parallel Inspector would also be a good choice to detect them).
Of course we will takeyour reported issue seriously and try to reproduce this, but in your case I think you can safelyremove option /debug:parallel for now.
I've already run Parallel Inspector. Obviously, I wouldn't ship a product with /debug:parallel enabled and release builds don't produce the link error anyway.
I do have much data sharing going on and OpenMP is perhaps not the best solution, but it's the hand I've been dealt. It's tedious, but /debug:parallel does allow me to check whether the events it shows are real problems - ie. is the data protected by a mutex etc..