我已经在ubuntu 9.10中的'/ media/data/bin'中编译并安装了我的boost库.我已经设置了INCLUDE_PATH,LIBRARY_PATH环境:
$ echo $INCLUDE_PATH /media/data/bin/boost/include: $ echo $LIBRARY_PATH /media/data/bin/boost/lib:
但是当我编译asio示例时,我收到以下错误:$ g ++ blocking_tcp_echo_server.cpp
blocking_tcp_echo_server.cpp:13:26: error: boost/bind.hpp: No such file or directory blocking_tcp_echo_server.cpp:14:31: error: boost/smart_ptr.hpp: No such file or directory blocking_tcp_echo_server.cpp:15:26: error: boost/asio.hpp: No such file or directory blocking_tcp_echo_server.cpp:16:28: error: boost/thread.hpp: No such file or directory blocking_tcp_echo_server.cpp:18: error: ‘boost’ has not been declared blocking_tcp_echo_server.cpp:22: error: ‘boost’ has not been declared blocking_tcp_echo_server.cpp:22: error: expected initializer before ‘<’ token blocking_tcp_echo_server.cpp:24: error: variable or field ‘session’ declared void blocking_tcp_echo_server.cpp:24: error: ‘socket_ptr’ was not declared in this scope
Dirk Eddelbu.. 10
出什么问题了
sudo apt-get install libboost-dev
之后你不需要设置任何-I
和-L
标志.如果你需要Boost 1.40,你仍然可以重建当前的Debian unstable包.
出什么问题了
sudo apt-get install libboost-dev
之后你不需要设置任何-I
和-L
标志.如果你需要Boost 1.40,你仍然可以重建当前的Debian unstable包.