[英]Compile boost example programs on AIX
I can successfully compile the simple_ls.cpp with this command: 我可以使用以下命令成功编译simple_ls.cpp:
xlc++ -qstrict -brtl -I /usr/local/include -L /usr/local/lib simple_ls.cpp -lboost_filesystem -o simple_ls
However when I use the exact same syntax with the path_info.cpp command I get this error: 但是,当我在path_info.cpp命令中使用完全相同的语法时,会出现此错误:
xlc++ -qstrict -brtl -I /usr/local/include -L /usr/local/lib path_info.cpp -lboost_filesystem -o path_info
ld: 0711-317 ERROR: Undefined symbol: .boost::system::generic_category()
ld: 0711-317 ERROR: Undefined symbol: .boost::system::system_category()
ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more information.
您需要将第二个程序与boost_system链接。
xlc++ -qstrict -brtl -I /usr/local/include -L /usr/local/lib path_info.cpp -lboost_filesystem -o path_info -lboost_system
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.