title: Visual Studio 2010: strange linker error
body: <p>I have the following code in my project:</p>
  
  <p>SomeCode.h :</p>
  
  <pre><code>#pragma once 
  
  #include "defines.h"
  
  void Function1(int *param1, float *param2, int count);
  void Function2(int *param1, float *param2);
  void Function3(int *param1, float *param2);
  </code></pre>
  
  <p>SomeCode.cpp :</p>
  
  <pre><code>#include "SomeCode.h"
  
  void Function1(int *param1, float *param2, int count)
  {
  //implementation
  }
  
  void Function2(int *param1, float *param2)
  {
  //implementation
  }
  
  void Function3(int *param1, float *param2)
  {
  //implementation
  }
  </code></pre>
  
  <p>main.cpp:</p>
  
  <pre><code>#include "SomeCode.h"
  
  int main()
  {
  // some Function1, Function2, Function3 usage
  }
  </code></pre>
  
  <p>All the above files are in the same folder.</p>
  
  <p>The solution compiles fine, but i get Function1, Function2, Function3 unresolved external errors. Cleaning and building again doesn't help. However a magical workaround to make it building successfully is the following:
  1) comment all the lines in SomeCode.cpp
  2) build the solution and get the same linker errors
  3) uncomment the lines
  4) build again</p>
  
  <p>I encounter the same problem from time to time when I change something in my project (adding new files, making changes to existing once). However this happens not on a regular basis, so I can't tell precisely when the problem appear.</p>
  
  <p>Any ideas what might cause these troubles?</p>