如何使程序读取第二个boost库的路径

如何使程序读取第二个boost库的路径,boost,Boost,我试图编译一个程序,利用线程和无锁队列。我正在开发一个系统(RHEL),它是另一个系统的一部分,该系统已经有一个boost库,但版本为1.44。因此,我从另一个目录中的源代码构建/安装boost库版本1.56。 但是,当我尝试使用以下命令编译程序时,我得到以下错误:- g++-I/data/ojaved/boost_install-L/data/ojaved/boost_install/lib-pthread-lboost_thread test_boost.cxx In file includ

我试图编译一个程序,利用线程和无锁队列。我正在开发一个系统(RHEL),它是另一个系统的一部分,该系统已经有一个boost库,但版本为1.44。因此,我从另一个目录中的源代码构建/安装boost库版本1.56。 但是,当我尝试使用以下命令编译程序时,我得到以下错误:-

g++-I/data/ojaved/boost_install-L/data/ojaved/boost_install/lib-pthread-lboost_thread test_boost.cxx

In file included from /usr/include/boost/thread/detail/platform.hpp:17:0,
             from /usr/include/boost/thread/thread.hpp:12,
             from test_boost.cxx:2:
/usr/include/boost/config/requires_threads.hpp:29:4: error: #error "Threading support            
unavaliable: it has been explicitly disabled with BOOST_DISABLE_THREADS"
#  error "Threading support unavaliable: it has been explicitly disabled with    
BOOST_DISABLE_THREADS"
^
In file included from /usr/include/boost/thread/thread.hpp:12:0,
             from test_boost.cxx:2:
/usr/include/boost/thread/detail/platform.hpp:67:9: error: #error "Sorry, no boost   
threads are available for this platform."
#       error "Sorry, no boost threads are available for this platform."
     ^
In file included from test_boost.cxx:2:0:
/usr/include/boost/thread/thread.hpp:19:2: error: #error "Boost threads unavailable on    
this platform"
#error "Boost threads unavailable on this platform"
^
In file included from /usr/include/boost/thread/detail/thread.hpp:11:0,
             from /usr/include/boost/thread/thread.hpp:22,
             from test_boost.cxx:2:
/usr/include/boost/thread/mutex.hpp:18:2: error: #error "Boost threads unavailable on   
this platform"
#error "Boost threads unavailable on this platform"
^
In file included from /usr/include/boost/thread/detail/thread.hpp:13:0,
             from /usr/include/boost/thread/thread.hpp:22,
             from test_boost.cxx:2:
/usr/include/boost/thread/detail/thread_heap_alloc.hpp:19:2: error: #error "Boost threads   
unavailable on this platform"
#error "Boost threads unavailable on this platform"
^
In file included from /usr/include/boost/thread/detail/thread_group.hpp:9:0,
             from /usr/include/boost/thread/thread.hpp:24,
             from test_boost.cxx:2:
/usr/include/boost/thread/shared_mutex.hpp:18:2: error: #error "Boost threads unavailable   
on this platform"
#error "Boost threads unavailable on this platform"
^
test_boost.cxx:3:36: fatal error: boost/lockfree/queue.hpp: No such file or directory

#include <boost/lockfree/queue.hpp>
                                ^
compilation terminated.
在/usr/include/boost/thread/detail/platform.hpp:17:0中包含的文件中,
从/usr/include/boost/thread/thread.hpp:12,
来自test_boost.cxx:2:
/usr/include/boost/config/requires_threads.hpp:29:4:error:#error“线程支持
不可用:它已被BOOST_DISABLE_线程显式禁用”
#错误“线程支持不可用:已使用显式禁用
增强\禁用\线程“
^
在/usr/include/boost/thread/thread.hpp:12:0中包含的文件中,
来自test_boost.cxx:2:
/usr/include/boost/thread/detail/platform.hpp:67:9:error:#error“对不起,没有boost
线程可用于此平台。”
#错误“抱歉,此平台没有可用的boost线程。”
^
包含在test_boost.cxx中的文件中:2:0:
/usr/include/boost/thread/thread.hpp:19:2:error:#error“boost线程在上不可用”
这个平台“
#错误“此平台上的Boost线程不可用”
^
在/usr/include/boost/thread/detail/thread.hpp:11:0中包含的文件中,
从/usr/include/boost/thread/thread.hpp:22,
来自test_boost.cxx:2:
/usr/include/boost/thread/mutex.hpp:18:2:error:#error“boost线程在上不可用”
这个平台“
#错误“此平台上的Boost线程不可用”
^
在/usr/include/boost/thread/detail/thread.hpp:13:0中包含的文件中,
从/usr/include/boost/thread/thread.hpp:22,
来自test_boost.cxx:2:
/usr/include/boost/thread/detail/thread_heap_alloc.hpp:19:2:error:#error“boost threads
此平台上不可用“
#错误“此平台上的Boost线程不可用”
^
在/usr/include/boost/thread/detail/thread_group.hpp:9:0中包含的文件中,
从/usr/include/boost/thread/thread.hpp:24,
来自test_boost.cxx:2:
/usr/include/boost/thread/shared_mutex.hpp:18:2:error:#error“boost线程不可用”
在这个平台上“
#错误“此平台上的Boost线程不可用”
^
test_boost.cxx:3:36:致命错误:boost/lockfree/queue.hpp:没有这样的文件或目录
#包括
^
编译终止。

在我看来,它仍然找不到新的boost库的路径。

你在
/data/ojaved/boost\u install
路径上看到了什么?这是我创建的安装目录。它包含lib和include文件夹。您使用的编译器版本是什么?很抱歉,回复太晚,但我已成功编译了它,问题是我没有正确引用路径。编译时将路径从-I/data/ojaved/boost_install更改为-I/data/ojaved/boost_install/include。做了那件事之后,它起了作用。