1

在尝试使用 CMake 配置我的 c++ 项目时,我遇到了以下错误消息:

C 编译器标识未知 CXX 编译器标识未知 CMake 错误在 nestk/deps/eigen/CMakeLists.txt:71(消息):无法链接到标准数学库。请向 Eigen 开发人员报告,告诉他们您的平台。配置不完整,出现错误!

有没有人提示如何解决这个问题?

任何帮助深表感谢。

我正在使用:Windows 7 x64、CMake 2.8.10.2、VS2010 Ultimate

4

1 回答 1

0

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.

于 2014-08-20T21:57:40.207 回答