title: VS 2012 error LNK2001: unresolved external symbol
body: <p>I'm now studying Vertorization performance testing but I meet follwing errors</p>
  
  <blockquote>
    <p>1>ConsoleApplication2.obj : error LNK2001: unresolved external symbol "private: static union _LARGE_INTEGER Timer::m_freq" (?m_freq@Timer@@0T_LARGE_INTEGER@@A)
    1>ConsoleApplication2.obj : error LNK2001: unresolved external symbol "private: static __int64 Timer::m_overhead" (?m_overhead@Timer@@0_JA)
    1>c:\users\lara feodorovna\documents\visual studio 2012\Projects\ConsoleApplication2\Debug\ConsoleApplication2.exe : fatal error LNK1120: 2 unresolved externals</p>
  </blockquote>
  
  <p>---------------timer.h (I manualy added it)---------------</p>
  
  <pre><code>#pragma once
  #include &lt;windows.h&gt;
  
  struct Timer
  {
       void Start() 
       {
           QueryPerformanceCounter(&amp;m_start);
       }
  
       void Stop() 
       {
           QueryPerformanceCounter(&amp;m_stop);
       }
  
       // Returns elapsed time in milliseconds (ms)
       double Elapsed()
       {
           return (m_stop.QuadPart - m_start.QuadPart - m_overhead) \
                                             * 1000.0 / m_freq.QuadPart;
       }
  
   private:
  
       // Returns the overhead of the timer in ticks
       static LONGLONG GetOverhead()
       {
           Timer t;
           t.Start();
           t.Stop();
           return t.m_stop.QuadPart - t.m_start.QuadPart;
       }
  
       LARGE_INTEGER m_start;
       LARGE_INTEGER m_stop;
       static LARGE_INTEGER m_freq;
       static LONGLONG m_overhead;
  };
  </code></pre>
  
  <p>---------------------ConsolApplication2.cpp-----------------------</p>
  
  <pre><code>#include "stdafx.h"
  #include "timer.h"
  
  const int MAXNUM = 100000;
  
  int a[MAXNUM];
  int b[MAXNUM];
  int c[MAXNUM];
  
  int _tmain(int argc, _TCHAR* argv[])
  {
      Timer timer;
      double time_NoVector;
      double time_Vector;
  
      //No Vectorization
      timer.Start();
      #pragma loop(no_vector)
      for (int j=0; j&lt;MAXNUM; j++)
      {
          c[j]=a[j]+b[j];
      }
      timer.Stop();
      time_NoVector=timer.Elapsed();
  
      //Vectorization
      timer.Start();
      for(int j=0; j &lt;MAXNUM; j++)
      {
          c[j] = a[j] + b[j];
      }
      timer.Stop();
      time_Vector=timer.Elapsed();
  
      printf("---------------------------------------------\n");
      printf("%-14s %10s %10s\n", "Version", "Times(s)", "Speedup");
      printf("---------------------------------------------\n");
      printf("%-14s %10.4f %10.4f\n", "NoVector", time_NoVector, 1.0);
      printf("%-14s %10.4f %10.4f\n\n", "Vector", time_Vector, time_NoVector / time_Vector);
  
      return 0;
  
  }
  </code></pre>
  
  <p>please help me</p>