我在ubuntu 9.10的'/ media/data/bin'中編譯並安裝了我的boost庫。 我已經設置了INCLUDE_PATH,LIBRARY_PATH ENV:在ubuntu上設置boost庫的問題
$ 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
我沒有使用這個,因爲它會提升我的主驅動器,我用盡了空間。所以我編譯/安裝我的外部硬盤驅動器(它比我的主驅動器有更多的空間)。 – n179911 2009-12-31 01:04:52