我有一個目錄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分別在第4行和第6行分別具有以下標頭 #include<maths/Dense>
,因此我收到錯誤消息。
我該如何解決它。
你確定它不是Dense.h或Dense.hpp嗎? – 2012-04-25 21:56:09
@chris,解決了它......謝謝! – user1155299 2012-04-25 21:59:46