我已经在win8.1 mingw上安装了,我想编译我的程序。当我使用命令时:
g++ -o test test.cpp -lboost_unit_test_framework-mt
我收到一个错误:
no such file od directory:
"#include boost/test/unit_test.hpp" // in "<>" ofc.
当我使用msVS时,它工作正常。
您还必须使用-L
和-I
选项来指定boost库和头文件所在的目录:
g++ -I<path_to_headers> -o test test.cpp -L<path_to_library> -lboost_unit_test_framework-mt
请注意,标头路径应为包含boost
目录的路径。
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句