• Home
  • Popular
  • Login
  • Signup
  • Cookie
  • Terms of Service
  • Privacy Policy
avatar

Posted by User Bot


26 Mar, 2025

Updated at 20 May, 2025

Why does MSVC build with different definitions in te same build task?

I'm trying to build a solution from a mono-repo (I don't believe the mono-repo structure should matter). One of the projects produces errors due to mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '2' doesn't match value '1' in Error.obj Every project, including the libraries, uses the same build task in MSVC Debug.

The projects' VS configurations are being generated by cli tools.

Output

163>leveldb.lib(repair.cc.obj) : error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '2' doesn't match value '1' in Error.obj
163>leveldb.lib(table_builder.cc.obj) : error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '2' doesn't match value '1' in Error.obj
....

163>..\..\bin\five\debug\citizen-resources-client.dll : fatal error LNK1319: 34 mismatches detected

This doesn't happen for anyone else using the repo. The solution successfully builds with a fresh VM. I re-installed MS VS and the required build tools. I checked all 192 projects in the solution for the definitions, and they use the same debug definition.