title: Error LNK2019: unresolved external symbol "toString(int)"
body: <p>Environment: Windows XP. Visual Studios 2010. Language - C++. </p>
  
  <p>I have run into the following link error &amp; have run out of ideas how to fix this problem. I have a project (CnD Device) which links to 2 projects (Messages &amp; Carbon) controlled by my group. I have tried to search for project properties between the 3 projects</p>
  
  <pre><code>enter tcp_driver.obj : error LNK2019: unresolved external symbol "class std::basic_string&lt;char,struct std::char_traits&lt;char&gt;,class std::allocator&lt;char&gt; &gt; __cdecl toString(int)" (?toString@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@H@Z) referenced in function "protected: bool __thiscall Tcp_Driver::readMessage(void)" (?readMessage@Tcp_Driver@@IAE_NXZ)
  </code></pre>
  
  <p>I believe this problem is because I am not linking to the string which is in Standard C++ Library. I have scanned my properties list over and over again. Below is some of the properties I believe are critical for this problem.</p>
  
  <p>CnD Device property information:</p>
  
  <ol>
  <li><strong>Configuration Type</strong> Dynamic Library .dll</li>
  <li><strong>Use of MFC</strong> Use MFC in a Shared DLL</li>
  <li><strong>Use of ALT</strong> Not Using ALT</li>
  <li><strong>Character Set</strong> Use Multi-Byte Character Set</li>
  <li><strong>Runtime Library</strong> Multi-threaded DLL (/MD)</li>
  <li><strong>Additional Dependencies</strong> msvcprtd.lib, Carbon.lib, BUFFER_API.lib, BUFFER_FRAMEWORK.lib, Messages.lib</li>
  <li><strong>Ignore All Default Libraries</strong> No</li>
  </ol>
  
  <p>Messages Properties Information: </p>
  
  <ol>
  <li><strong>Configuration Type</strong> Static Library (.lib)</li>
  <li><strong>Use of MFC</strong> Use MFC in a Shared DLL</li>
  <li><strong>Use of ALT</strong> Not Using ALT</li>
  <li><strong>Character Set</strong> Use Unicode Character Set</li>
  <li><strong>Runtime Library</strong> Multi-threaded DLL (/MD)</li>
  <li><strong>Additional Dependencies</strong> </li>
  <li><strong>Link Library Dependencies</strong> No</li>
  </ol>
  
  <p>Carbon Properties Information: </p>
  
  <ol>
  <li><strong>Configuration Type</strong> Static Library (.lib)</li>
  <li><strong>Use of MFC</strong> Use MFC in a Shared DLL</li>
  <li><strong>Use of ALT</strong> Not Using ALT</li>
  <li><strong>Character Set</strong> Use Unicode Character Set</li>
  <li><strong>Runtime Library</strong> Multi-threaded DLL (/MD)</li>
  <li><strong>Link Library Dependencies</strong> No</li>
  </ol>
  
  <p>My CnD link output is: </p>
  
  <pre><code>1&gt;------ Rebuild All started: Project: CnD_Device, Configuration: Debug Win32 ------
      1&gt;  JDTC_Message.cpp
      1&gt;h:\my.name_local_project\project\emd\ofp\cp_sys\packages\cnd_device\src\project_message.cpp(47): warning C4018: '&lt;' : signed/unsigned mismatch
      1&gt;h:\my.name_local_project\project\emd\ofp\cp_sys\packages\cnd_device\src\project_message.cpp(54): warning C4244: '=' : conversion from 'float' to 'UInt32', possible loss of data
      1&gt;h:\my.name_local_project\project\emd\ofp\cp_sys\packages\cnd_device\src\project_message.cpp(82): warning C4244: '=' : conversion from 'UInt32' to 'float', possible loss of data
      1&gt;  ComponentEntryDLL.cpp
      1&gt;  CnD_Network_Driver.cpp
      1&gt;  CnD_Message_Handler.cpp
      1&gt;  CnD_Message_Factory.cpp
      1&gt;  CnD_Heartbeat_Message.cpp
      1&gt;  CnD_Device.cpp
      1&gt;  _WIN32_WINNT not defined. Defaulting to _WIN32_WINNT_MAXVER (see WinSDKVer.h)
      1&gt;h:\my.name_local_project\project\emd\ofp\cp_sys\packages\cnd_device\src\cnd_device.cpp(61): warning C4101: 'e' : unreferenced local variable
      1&gt;h:\my.name_local_project\project\emd\ofp\cp_sys\packages\cnd_device\src\cnd_device.cpp(120): warning C4101: 'e' : unreferenced local variable
      1&gt;  MonitoringData.cpp
      1&gt;  tcp_driver.cpp
      1&gt;  _WIN32_WINNT not defined. Defaulting to _WIN32_WINNT_MAXVER (see WinSDKVer.h)
      1&gt;  Generating Code...
      1&gt;h:\my.name_local_project\project\emd\ofp\cp_sys\packages\cnd_device\src\cnd_message_factory.cpp(59): warning C4715: 'CnD_Message_Factory::createMessage' : not all control paths return a value
      1&gt;  
      1&gt;  Searching libraries
      1&gt;      Searching C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\lib\msvcprtd.lib:
      1&gt;      Searching ..\..\..\..\..\..\Carbon\debug\lib\Carbon.lib:
      1&gt;      Searching ..\..\..\..\..\..\..\EMD\BUFFER_SDK\Libs\BUFFER_API.lib:
      1&gt;      Searching ..\..\..\..\..\..\..\EMD\BUFFER_SDK\Libs\BUFFER_Framework.lib:
      1&gt;      Searching ..\..\..\..\..\..\Messages\Debug\lib\Messages.lib:
      1&gt;      Searching C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\atlmfc\lib\mfc100d.lib:
      1&gt;      Searching C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\atlmfc\lib\mfcs100d.lib:
      1&gt;      Searching C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\lib\msvcrtd.lib:
      1&gt;      Searching C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\lib\kernel32.lib:
      1&gt;      Searching C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\lib\user32.lib:
      1&gt;      Searching C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\lib\gdi32.lib:
      1&gt;      Searching C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\lib\msimg32.lib:
      1&gt;      Searching C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\lib\comdlg32.lib:
      1&gt;      Searching C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\lib\winspool.lib:
      1&gt;      Searching C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\lib\advapi32.lib:
      1&gt;      Searching C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\lib\shell32.lib:
      1&gt;      Searching C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\lib\comctl32.lib:
      1&gt;      Searching C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\lib\shlwapi.lib:
      1&gt;      Searching C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\lib\uuid.lib:
      1&gt;      Searching C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\atlmfc\lib\atlsd.lib:
      1&gt;      Searching C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\lib\ole32.lib:
      1&gt;      Searching C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\lib\oleaut32.lib:
      1&gt;      Searching C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\lib\MSVCRT.lib:
      1&gt;      Searching C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\lib\OLDNAMES.lib:
      1&gt;      Searching C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\atlmfc\lib\mfc100ud.lib:
      1&gt;      Searching C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\atlmfc\lib\mfcs100ud.lib:
      1&gt;      Searching C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\lib\msvcprt.lib:
      1&gt;      Searching C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\lib\wininet.lib:
      1&gt;      Searching C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\lib\ws2_32.lib:
      1&gt;      Searching C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\lib\mswsock.lib:
      1&gt;      Searching C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\lib\msvcprtd.lib:
      1&gt;      Searching ..\..\..\..\..\..\Carbon\debug\lib\Carbon.lib:
      1&gt;      Searching ..\..\..\..\..\..\..\EMD\BUFFER_SDK\Libs\BUFFER_API.lib:
      1&gt;      Searching ..\..\..\..\..\..\..\EMD\BUFFER_SDK\Libs\BUFFER_Framework.lib:
      1&gt;      Searching ..\..\..\..\..\..\Messages\Debug\lib\Messages.lib:
      1&gt;      Searching C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\atlmfc\lib\mfc100d.lib:
      1&gt;      Searching C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\atlmfc\lib\mfcs100d.lib:
      1&gt;      Searching C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\lib\msvcrtd.lib:
      1&gt;      Searching C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\lib\kernel32.lib:
      1&gt;      Searching C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\lib\user32.lib:
      1&gt;      Searching C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\lib\gdi32.lib:
      1&gt;      Searching C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\lib\msimg32.lib:
      1&gt;      Searching C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\lib\comdlg32.lib:
      1&gt;      Searching C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\lib\winspool.lib:
      1&gt;      Searching C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\lib\advapi32.lib:
      1&gt;      Searching C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\lib\shell32.lib:
      1&gt;      Searching C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\lib\comctl32.lib:
      1&gt;      Searching C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\lib\shlwapi.lib:
      1&gt;      Searching C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\lib\uuid.lib:
      1&gt;      Searching C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\atlmfc\lib\atlsd.lib:
      1&gt;      Searching C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\lib\ole32.lib:
      1&gt;      Searching C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\lib\oleaut32.lib:
      1&gt;      Searching C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\lib\MSVCRT.lib:
      1&gt;      Searching C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\lib\OLDNAMES.lib:
      1&gt;      Searching C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\atlmfc\lib\mfc100ud.lib:
      1&gt;      Searching C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\atlmfc\lib\mfcs100ud.lib:
      1&gt;      Searching C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\lib\msvcprt.lib:
      1&gt;      Searching C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\lib\wininet.lib:
      1&gt;      Searching C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\lib\ws2_32.lib:
      1&gt;      Searching C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\lib\mswsock.lib:
      1&gt;      Searching C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\lib\msvcprtd.lib:
      1&gt;      Searching ..\..\..\..\..\..\Carbon\debug\lib\Carbon.lib:
      1&gt;      Searching ..\..\..\..\..\..\..\EMD\BUFFER_SDK\Libs\BUFFER_API.lib:
      1&gt;      Searching ..\..\..\..\..\..\..\EMD\BUFFER_SDK\Libs\BUFFER_Framework.lib:
      1&gt;      Searching ..\..\..\..\..\..\Messages\Debug\lib\Messages.lib:
      1&gt;      Searching C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\atlmfc\lib\mfc100d.lib:
      1&gt;      Searching C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\atlmfc\lib\mfcs100d.lib:
      1&gt;      Searching C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\lib\msvcrtd.lib:
      1&gt;      Searching C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\lib\kernel32.lib:
      1&gt;      Searching C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\lib\user32.lib:
      1&gt;      Searching C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\lib\gdi32.lib:
      1&gt;      Searching C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\lib\msimg32.lib:
      1&gt;      Searching C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\lib\comdlg32.lib:
      1&gt;      Searching C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\lib\winspool.lib:
      1&gt;  
      1&gt;  Finished searching libraries
      1&gt;     Creating library H:\my.name_local_project\project\EMD\OFP\CP_SYS\packages\CnD_Device\build\CnD_Device\Debug\CnD_Device.lib and object H:\my.name_local_project\project\EMD\OFP\CP_SYS\packages\CnD_Device\build\CnD_Device\Debug\CnD_Device.exp
      1&gt;  
      1&gt;  Searching libraries
      1&gt;      Searching C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\lib\msvcprtd.lib:
      1&gt;      Searching ..\..\..\..\..\..\Carbon\debug\lib\Carbon.lib:
      1&gt;      Searching ..\..\..\..\..\..\..\EMD\BUFFER_SDK\Libs\BUFFER_API.lib:
      1&gt;      Searching ..\..\..\..\..\..\..\EMD\BUFFER_SDK\Libs\BUFFER_Framework.lib:
      1&gt;      Searching ..\..\..\..\..\..\Messages\Debug\lib\Messages.lib:
      1&gt;      Searching C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\atlmfc\lib\mfc100d.lib:
      1&gt;      Searching C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\atlmfc\lib\mfcs100d.lib:
      1&gt;      Searching C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\lib\msvcrtd.lib:
      1&gt;      Searching C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\lib\kernel32.lib:
      1&gt;      Searching C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\lib\user32.lib:
      1&gt;      Searching C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\lib\gdi32.lib:
      1&gt;      Searching C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\lib\msimg32.lib:
      1&gt;      Searching C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\lib\comdlg32.lib:
      1&gt;      Searching C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\lib\winspool.lib:
      1&gt;      Searching C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\lib\advapi32.lib:
      1&gt;      Searching C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\lib\shell32.lib:
      1&gt;      Searching C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\lib\comctl32.lib:
      1&gt;      Searching C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\lib\shlwapi.lib:
      1&gt;      Searching C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\lib\uuid.lib:
      1&gt;      Searching C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\atlmfc\lib\atlsd.lib:
      1&gt;      Searching C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\lib\ole32.lib:
      1&gt;      Searching C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\lib\oleaut32.lib:
      1&gt;      Searching C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\lib\MSVCRT.lib:
      1&gt;      Searching C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\lib\OLDNAMES.lib:
      1&gt;      Searching C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\atlmfc\lib\mfc100ud.lib:
      1&gt;      Searching C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\atlmfc\lib\mfcs100ud.lib:
      1&gt;      Searching C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\lib\msvcprt.lib:
      1&gt;      Searching C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\lib\wininet.lib:
      1&gt;      Searching C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\lib\ws2_32.lib:
      1&gt;      Searching C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\lib\mswsock.lib:
      1&gt;  
      1&gt;  Finished searching libraries
      1&gt;LINK : warning LNK4098: defaultlib 'MSVCRT' conflicts with use of other libs; use /NODEFAULTLIB:library
      1&gt;LINK : warning LNK4098: defaultlib 'mfc100ud.lib' conflicts with use of other libs; use /NODEFAULTLIB:library
      1&gt;LINK : warning LNK4098: defaultlib 'mfcs100ud.lib' conflicts with use of other libs; use /NODEFAULTLIB:library
      1&gt;tcp_driver.obj : error LNK2019: unresolved external symbol "class std::basic_string&lt;char,struct std::char_traits&lt;char&gt;,class std::allocator&lt;char&gt; &gt; __cdecl toString(int)" (?toString@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@H@Z) referenced in function "protected: bool __thiscall Tcp_Driver::readMessage(void)" (?readMessage@Tcp_Driver@@IAE_NXZ)
      1&gt;H:\my.name_local_project\project\EMD\OFP\CP_SYS\packages\CnD_Device\build\CnD_Device\Debug\CnD_Device.dll : fatal error LNK1120: 1 unresolved externals
      ========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========
  </code></pre>