我試着用/不用-m64選項,它不工作。我應該如何解決這個問題?在Mac上C++ boost編譯錯誤
Undefined symbols for architecture x86_64:
"boost::system::system_category()", referenced from:
boost::asio::error::get_system_category() in main-6996c8.o
boost::system::error_code::error_code() in main-6996c8.o
___cxx_global_var_init.2 in main-6996c8.o
"boost::system::generic_category()", referenced from:
___cxx_global_var_init in main-6996c8.o
___cxx_global_var_init.1 in main-6996c8.o
ld: symbol(s) not found for architecture x86_64
你必須顯示編譯和鏈接命令 – pm100
我用brew安裝了boost。該命令是g ++ -std = C++ 11 main.cpp – ManAtMiddleWaterloo
'main-6996c8.o'的源代碼中include語句的外觀是什麼? – NonCreature0714