我正在用 clang 编译我的项目,但我遇到了一个奇怪的错误:
[ 1%] Building CXX object CMakeFiles/tfs.dir/src/actions.cpp.o
In file included from /home/travis/build/dominique120/miniature-adventure/src/actions.cpp:20:
In file included from /home/travis/build/dominique120/miniature-adventure/src/otpch.h:27:
/home/travis/build/dominique120/miniature-adventure/src/definitions.h:39:10: fatal error:
'cmath' file not found
#include <cmath>
^
make: *** [all] Error 2
我的 actions.cpp 第 20 行:
#include "otpch.h"
otpch.h 第 27 行:
#include "definitions.h"
定义.h 第 31 行:
#include <cmath>
我做了一些编辑,但我不知道是什么导致了这个错误,在这里编辑:https ://github.com/dominique120/miniature-adventure/commits/master
PS:GCC 只是转储了大量错误: https ://travis-ci.org/dominique120/miniature-adventure/jobs/21905513