我尝试在gcc 6.0的开发中实际使用新的c ++ 1z功能。如果我尝试这个小例子:#include <iostream>#include <experimental/filesystem>namespace fs = std::experimental::filesystem;int main(){ fs::path p1 = "/home/pete/checkit"; std::cout << "p1 = " << p1 << std::endl;}我有:/ opt / linux-gnu_6-20151011 / bin / g ++ --std = c ++ 1z main.cpp -O2 -g -o go/tmp/ccaGzqFO.o:在函数\`std :: experimental :: filesystem :: v1 :: __ cxx11 :: path :: path(char const(&)[36])'中:/opt/linux-gnu_6-20151011/include/c++/6.0.0/experimental/bits/fs_path.h:167:对`std :: experimental :: filesystem :: v1 :: __ cxx11 :: path :: _ M_split_cmpts的未定义引用()”collect2:错误:ld返回1退出状态gcc版本是快照linux-gnu_6-20151011有什么提示如何链接新的c ++ 1z功能吗?
3 回答
- 3 回答
- 0 关注
- 713 浏览
添加回答
举报
0/150
提交
取消