简体   繁体   中英

Cannot include boost.asio

I am trying to include boost.asio library, but whenever I do that I get this error message:

 undefined reference to `boost::system::generic_category()'

I can include any other boost library, but not this one.

I tried to link boost.System like this:

icpc -lboost_system main.cpp -o out.o

It gave me this message

ld: cannot find -lboost_system

You need to link Boost.System in order for Asio to work. See here .

正如@ Space_C0wb0y所不及的那样,您需要构建Boost.System或使用其正确的名称进行链接(例如-lboost_system-mt)。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM