1

I am using VS2015 C++ Project. Initially I had a LNK2038 issue which was

error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '0' doesn't match value '1' in imagecolor.obj

so I added _ITERATOR_DEBUG_LEVEL=0, 1, and 2 under Additional Dependencies. However now I have a new error showing up instead:

C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\yvals.h(174): fatal error C1189: #error:  _ITERATOR_DEBUG_LEVEL > 1 is not supported in release mode.

Based on what I gathered, I added what I mentioned earlier and checking the Runtime Library (Multri-Threaded DLL). I'm a little beat on how to troubleshoot. Any help will be greatly appreciated. Thanks!

Kazu
  • 11
  • 2
  • https://stackoverflow.com/q/4738987/1531971 among others. –  Jul 10 '18 at 16:15
  • Nobody knows what your LNK2038 issue was or "what I mentioned earlier." Each question must stand alone and be complete in itself. – Zan Lynx Jul 10 '18 at 16:16
  • This means you are mixing debug and release. Even if you force it to compile you will have Undefined Behavior. The correct fix is to make sure all dependent libraries were compiled with the same configuration as your executable. Also make sure none of your dependent libraries were built with a lower version of Visual Studio than 2015. 2015 and 2017 have binary compatibility any other version is incompatible. – drescherjm Jul 10 '18 at 16:19
  • I added in the LNK2038 in the post, what I meant is that LNK2038 error was what I was troubleshooting, which doesn't show now, but now I have different error popping up. Sorry for the confusion. – Kazu Jul 10 '18 at 16:23
  • @Kazu does this error really happen with `_ITERATOR_DEBUG_LEVEL=1`? – John McFarlane Mar 21 '22 at 09:18

0 Answers0