title: Linking errors when building Debug
body: <p>Whenever I build my code in Release, it compiles and runs fine. However, when I switch to Debug, I get some errors that I can't seem to figure out.</p>
  
  <pre><code>swift.lib(scene.obj) : error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '0' doesn't match value '2' in main.obj
  1&gt;swift.lib(fileio.obj) : error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '0' doesn't match value '2' in main.obj
  1&gt;swift.lib(mesh_utils.obj) : error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '0' doesn't match value '2' in main.obj
  1&gt;swift.lib(object.obj) : error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '0' doesn't match value '2' in main.obj
  1&gt;swift.lib(mesh.obj) : error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '0' doesn't match value '2' in main.obj
  1&gt;swift.lib(pair.obj) : error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '0' doesn't match value '2' in main.obj
  1&gt;swift.lib(lut.obj) : error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '0' doesn't match value '2' in main.obj
  1&gt;msvcprt.lib(MSVCP100.dll) : error LNK2005: "public: class std::basic_ostream&lt;char,struct std::char_traits&lt;char&gt; &gt; &amp; __thiscall std::basic_ostream&lt;char,struct std::char_traits&lt;char&gt; &gt;::flush(void)" (?flush@?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV12@XZ) already defined in main.obj
  1&gt;msvcprt.lib(MSVCP100.dll) : error LNK2005: "public: void __thiscall std::basic_ostream&lt;char,struct std::char_traits&lt;char&gt; &gt;::_Osfx(void)" (?_Osfx@?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEXXZ) already defined in main.obj
  1&gt;msvcprt.lib(MSVCP100.dll) : error LNK2005: "bool __cdecl std::uncaught_exception(void)" (?uncaught_exception@std@@YA_NXZ) already defined in libcpmtd.lib(uncaught.obj)
  1&gt;msvcprt.lib(MSVCP100.dll) : error LNK2005: "public: void __thiscall std::basic_ios&lt;char,struct std::char_traits&lt;char&gt; &gt;::setstate(int,bool)" (?setstate@?$basic_ios@DU?$char_traits@D@std@@@std@@QAEXH_N@Z) already defined in main.obj
  1&gt;msvcprt.lib(MSVCP100.dll) : error LNK2005: "public: __int64 __thiscall std::basic_streambuf&lt;char,struct std::char_traits&lt;char&gt; &gt;::sputn(char const *,__int64)" (?sputn@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAE_JPBD_J@Z) already defined in main.obj
  </code></pre>
  
  <p>A bunch more of those and then...</p>
  
  <pre><code>1&gt;MSVCRT.lib(MSVCR100.dll) : error LNK2005: "public: __thiscall std::exception::exception(char const * const &amp;)" (??0exception@std@@QAE@ABQBD@Z) already defined in LIBCMTD.lib(stdexcpt.obj)
  1&gt;MSVCRT.lib(MSVCR100.dll) : error LNK2005: "public: virtual __thiscall std::exception::~exception(void)" (??1exception@std@@UAE@XZ) already defined in LIBCMTD.lib(stdexcpt.obj)
  1&gt;MSVCRT.lib(MSVCR100.dll) : error LNK2005: "public: __thiscall std::bad_cast::bad_cast(char const *)" (??0bad_cast@std@@QAE@PBD@Z) already defined in LIBCMTD.lib(stdexcpt.obj)
  1&gt;MSVCRT.lib(MSVCR100.dll) : error LNK2005: "public: __thiscall std::exception::exception(class std::exception const &amp;)" (??0exception@std@@QAE@ABV01@@Z) already defined in LIBCMTD.lib(stdexcpt.obj)
  1&gt;MSVCRT.lib(MSVCR100.dll) : error LNK2005: _memmove already defined in LIBCMTD.lib(memmove.obj)
  1&gt;MSVCRT.lib(MSVCR100.dll) : error LNK2005: _fgetc already defined in LIBCMTD.lib(fgetc.obj)
  1&gt;MSVCRT.lib(MSVCR100.dll) : error LNK2005: _fputc already defined in LIBCMTD.lib(fputc.obj)
  1&gt;MSVCRT.lib(MSVCR100.dll) : error LNK2005: _ungetc already defined in LIBCMTD.lib(ungetc.obj)
  1&gt;MSVCRT.lib(MSVCR100.dll) : error LNK2005: __lock_file already defined in LIBCMTD.lib(_file.obj)
  1&gt;MSVCRT.lib(MSVCR100.dll) : error LNK2005: __unlock_file already defined in LIBCMTD.lib(_file.obj)
  1&gt;MSVCRT.lib(MSVCR100.dll) : error LNK2005: _fflush already defined in LIBCMTD.lib(fflush.obj)
  1&gt;MSVCRT.lib(MSVCR100.dll) : error LNK2005: _setvbuf already defined in LIBCMTD.lib(setvbuf.obj)
  1&gt;MSVCRT.lib(MSVCR100.dll) : error LNK2005: _strncmp already defined in LIBCMTD.lib(strncmp.obj)
  1&gt;MSVCRT.lib(MSVCR100.dll) : error LNK2005: _memcpy_s already defined in LIBCMTD.lib(memcpy_s.obj)
  1&gt;MSVCRT.lib(MSVCR100.dll) : error LNK2005: _fwrite already defined in LIBCMTD.lib(fwrite.obj)
  1&gt;MSVCRT.lib(MSVCR100.dll) : error LNK2005: _fgetpos already defined in LIBCMTD.lib(fgetpos.obj)
  1&gt;MSVCRT.lib(MSVCR100.dll) : error LNK2005: __fseeki64 already defined in LIBCMTD.lib(fseeki64.obj)
  1&gt;MSVCRT.lib(MSVCR100.dll) : error LNK2005: _fsetpos already defined in LIBCMTD.lib(fsetpos.obj)
  1&gt;MSVCRT.lib(MSVCR100.dll) : error LNK2005: _fclose already defined in LIBCMTD.lib(fclose.obj)
  1&gt;MSVCRT.lib(ti_inst.obj) : error LNK2005: "private: __thiscall type_info::type_info(class type_info const &amp;)" (??0type_info@@AAE@ABV0@@Z) already defined in LIBCMTD.lib(typinfo.obj)
  1&gt;MSVCRT.lib(ti_inst.obj) : error LNK2005: "private: class type_info &amp; __thiscall type_info::operator=(class type_info const &amp;)" (??4type_info@@AAEAAV0@ABV0@@Z) already defined in LIBCMTD.lib(typinfo.obj)
  1&gt;LINK : warning LNK4098: defaultlib 'MSVCRT' conflicts with use of other libs; use /NODEFAULTLIB:library
  1&gt;C:\...\: fatal error     LNK1169: one or more multiply defined symbols found
  </code></pre>
  
  <p>I am using both the SWIFT and OPCODE libraries. I have "Runtime Library" field in C++->Code Generation the same for all 3 projects (my main project, swift, opcode). I have tried setting them all to \MT and all to \MD for Debug mode and neither work. Actually, when it builds successfully in Release, I have to set Opcode and my active project to \MD (swift can be either \md or \mt and it still builds). I don't really understand the runtime library for linking very well...so if this is the issue, can you try to be explicit?</p>
  
  <p>I also went looking for _ITERATOR_DEBUG_LEVEL, but couldn't find it. Where should this be located for me to change it? I can't find it anywhere in the source. I don't see it in the project properties, but it's perfectly plausible that I am just not looking in the right place in the properties.</p>
  
  <p>Apparently people have had similar errors with mis-matching Character sets. I have tried setting them all to multi and all to unicode. That didn't seem to have any effect.</p>
  
  <p>Currently, my active project only has swift.lib as an additional dependency. I have the opcode.dll and opcode_d.dll so I don't statically link those. </p>
  
  <p>In the Preprocessor under C/C++ settings, I have the following Preprocessor Definitions:</p>
  
  <p>Opcode:</p>
  
  <pre><code>WIN32
  _DEBUG
  _WINDOWS
  _USRDLL
  OPCODE_EXPORTS
  </code></pre>
  
  <p>SWIFT:</p>
  
  <pre><code>_DEBUG
  WIN32
  _LIB
  LOOKUP_TABLE_5_625
  </code></pre>
  
  <p>Active project:</p>
  
  <pre><code>WIN32
  _DEBUG
  _CONSOLE
  </code></pre>
  
  <p>I can provide more information if needed. Thanks for any help.</p>