【发布时间】:2012-04-25 21:55:25
【问题描述】:
我有一个目录maths,它是一个仅由头文件组成的库。
我正在尝试通过在我的主目录中运行以下命令来编译我的程序:
g++ -I ../maths prog1.cpp prog2.cpp test.cpp -o et -lboost_date_time -lgsl -lgslcblas
但我得到以下编译错误:
prog1.cpp:4:23: fatal error: maths/Dense: No such file or directory
compilation terminated.
prog2.cpp:6:23: fatal error: maths/Dense: No such file or directory
compilation terminated.
maths 与 .cpp 文件位于同一目录(即我的主目录)中,我也在我的家中运行编译行。
prog1.cpp 和 prog2.cpp 具有以下标头
#include<maths/Dense> 分别在第 4 行和第 6 行,因此出现错误。
我该如何解决。
【问题讨论】:
-
你确定不是 Dense.h 或 Dense.hpp?
-
@chris,解决了它...谢谢!
标签: c++