I wrote a short program to measure the performance of a function. The code looks like this:
#include <iostream>
#include <chrono>
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<double> elapsed = end - start;
std::cout << result;
std::cout << elapsed.count();
}
When I compile the code and start the .exe I get the following error:
The procedure entry point "_ZNSt6chrono3_V212system_clock3nowEv" could not be located in the dynamic link library "/my/path/main.exe".
I use MinGW to compile my code. I've already uninstalled MinGW and also deleted the environment variable.
The code works fine when I don't use the library.