我可以使用以下命令成功编译 simple_ls.cpp:
xlc++ -qstrict -brtl -I /usr/local/include -L /usr/local/lib simple_ls.cpp -lboost_filesystem -o simple_ls
但是,当我使用与 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.