1
votes

While trying to configure my c++ project using CMake I was faced with the following error message:

The C compiler identification is unknown The CXX compiler identification is unknown CMake Error at nestk/deps/eigen/CMakeLists.txt:71 (message): Can't link to the standard math library. Please report to the Eigen developers, telling them about your platform. Configuring incomplete, errors occurred!

Has anyone a hint of how to fix this problem?

Any help is much appreciated.

I'm using: Windows 7 x64, CMake 2.8.10.2, VS2010 Ultimate

1
Are you running cmake from a Visual Studio command prompt? - Fraser
Also did you pick the "Visual Studio 10 Win64" generator? - drescherjm
I am neither running cmake from the Visual Studio promt (I am working with the CMake-gui) nor choosing the "Visual Studio 10 Win64" generator (I took "Visual Studio 10" as the generator). - user2022955

1 Answers

0
votes

This happens because

#include <cmath>

does not compile on your machine. You will have to get this on your path to get around the standard math library error (I am working in ubuntu, but I had to install the gcc compiler). Try compiling and running this program:

#include<cmath>
#include<iostream>
int main() { std::cout << std::sin(0.0) << std::endl; std::cout << std::log(0.0f) << std::endl; }

Once you can do that, then make sure to remove the build directory you were running cmake in and try to build again.