更新时间:2023-09-19 23:20:34
find_package(Boost 1.62.0)
应该改成find_package(Boost REQUIRED COMPONENTS system)
再加上target_link_libraries(untitled1 ${Boost_LIBRARIES})
让cmake去搞定Boost。
另外,再加上链接Ws2_32.lib库。
if(WIN32)
target_link_libraries(untitled wsock32 ws2_32)
endif()