title: error LNK2019: unresolved external symbol for class unordered_map
body: <p>My code works on my school computer when using Visual Studio, but as soon as I tried on my computer with Visual Studio 2012 too, it compiles but gives me this error when I build my project : </p>
  
  <blockquote>
    <p>Main.obj : error LNK2019: unresolved external symbol "class std::unordered_map,class std::allocator >,int,struct std::hash,class std::allocator > >,struct std::equal_to,class std::allocator > >,class std::allocator,class std::allocator > const ,int> > > __cdecl getFrequency(class std::vector,class std::allocator >,class std::allocator,class std::allocator > > >,class std::unordered_map,class std::allocator >,int,struct std::hash,class std::allocator > >,struct std::equal_to,class std::allocator > >,class std::allocator,class std::allocator > const ,int> > >)" (?getFrequency@@YA?AV?$unordered_map@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@HU?$hash@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@2@U?$equal_to@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@2@V?$allocator@U?$pair@$$CBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@H@std@@@2@@std@@V?$vector@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V?$allocator@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@2@@2@V12@@Z) referenced in function _main
    C:\Users\name.lastname\Documents\Visual Studio 2012\Projects[Cpp]Mapping\Debug[Cpp]Mapping.exe : fatal error LNK1120: 1 unresolved externals</p>
  </blockquote>
  
  <p>Since it works on my school computer with the exact same code, Im not giving you the code because it is very heavy. I think it the problem is that the linker cannot see the unordered_map class, I know how to add library to my project but not this specific class.
  Any ideas? </p>
  
  <p>Comment if you really think that the code is important.</p>
  
  <p>Thanks in advance!</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>Here is my Map_Operations.h file where I declare the getFrequency(); method :</p>
  
  <pre><code>#ifndef MAP_OPERATIONS_H_
  #define MAP_OPERATIONS_H_
  
  #include &lt;string&gt;
  #include &lt;unordered_map&gt;
  #include &lt;vector&gt;
  
  std::unordered_map &lt;std::string, int&gt; getFrequency(std::vector&lt;std::string&gt; FILE_CONTENT, std::unordered_map&lt;std::string, int&gt; MASTER_MAP);
  
  #endif /* MAP_OPERATIONS_H_ */
  </code></pre>
  
  <p>And here is the file Map_Operations.cpp where I implement it:</p>
  
  <pre><code>#include "Map_Operations.h"
  
  #include &lt;string&gt;
  #include &lt;unordered_map&gt;
  #include &lt;vector&gt;
  
  using namespace std;
  
  unordered_map &lt;string, int&gt; getFrequency(vector&lt;string&gt; FILE_CONTENT, unordered_map&lt;string, int&gt; &amp; MASTER_MAP){
  
  unordered_map &lt;string, int&gt; MAP;
  
  // Iterate through the current file being copied and push_back all the words in the
  // DOCUMENTS_ALL vector and in the MAP to compute their frequency
  for(vector&lt;string&gt;::size_type j = 0; j != FILE_CONTENT.size(); ++j){
  
      string TEMP = FILE_CONTENT[j];
  
      unordered_map&lt;string, int&gt;::const_iterator MAP_CURRENT = MAP.find(TEMP); // Create iterator to know if the Key is in the MAP or not
      unordered_map&lt;string, int&gt;::const_iterator MAP_MASTER  = MASTER_MAP.find(TEMP); // Create iterator to know if the Key is in the MAP or not
  
      if ( MAP_CURRENT == MAP.end() ){ // If not in the MAP add it without incrementing
          MAP[TEMP] = 1;
      }else{ // If it is in the MAP then increment and add it
          MAP[TEMP] = MAP[TEMP]+1;          
      }
  
      if( MAP_MASTER == MASTER_MAP.end()){ // If not in the MASTER_MAP then add it
          MASTER_MAP[TEMP] = 1;
      }else { // If already in it then increment counter
          MASTER_MAP[TEMP] = MASTER_MAP[TEMP]+1; 
      }
  }
  
  return MAP;
  </code></pre>
  
  <p>}</p>