gpt4 book ai didi

c++ - boost 库问题

转载 作者:行者123 更新时间:2023-11-28 01:50:54 30 4
gpt4 key购买 nike

我正在尝试使用包含 boost include 的 g++ 编译一个简单的 c++ 程序,但出现以下错误。我从 boost 站点中找到的 tar 文件安装了它。我仅在 asio 库中收到以下错误。

$ g++ -std=c++03 -Wall -pedantic -g -O2 tcp.cpp -lboost_system -lboost_date_time -lboost_thread -lboost_asio
/usr/bin/ld: cannot find -lboost_asio
collect2: error: ld returned 1 exit status

最佳答案

Boost Asio 只是标题。

删除 -lboost_asio

关于c++ - boost 库问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43073902/

30 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com