title: C++ DLL could not be located
body: <p>I wrote a short program to measure the performance of a function. The code looks like this: </p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;chrono&gt;
  
  int main()
  {
      auto start = std::chrono::high_resolution_clock::now();
  
      // Here is the test function
  
      auto end = std::chrono::high_resolution_clock::now();
  
      std::chrono::duration&lt;double&gt; elapsed = end - start;
  
      std::cout &lt;&lt; result;
      std::cout &lt;&lt; elapsed.count();
  }
  </code></pre>
  
  <p>When I compile the code and start the .exe I get the following error:</p>
  
  <p>The procedure entry point "_ZNSt6chrono3_V212system_clock3nowEv" could not be located in the dynamic link library "/my/path/main.exe".</p>
  
  <p>I use MinGW to compile my code. I've already uninstalled MinGW and also deleted the environment variable.</p>
  
  <p>The code works fine when I don't use the  library.</p>