我使用的autoconf检测升压库的支持的 autoconf-归档宏和他们很好地工作的全系统Boost库,但失败,如果我在我的主目录手工编译升压:

sb@stephane:~/devel/spectra2$ ./configure --with-boost=/home/sb/local/
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking for style of include used by make... GNU
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables... 
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking dependency style of gcc... gcc3
checking for library containing strerror... none required
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking dependency style of g++... gcc3
checking for boostlib >= 1.31.0... yes
checking whether the Boost::Program_Options library is available... yes
checking for exit in -lboost_program_options... yes
checking whether the Boost::Filesystem library is available... yes
checking for exit in -lboost_filesystem... no
checking for exit in -lboost_filesystem... (cached) no
checking for exit in -lboost_filesystem... (cached) no
configure: error: Could not link against boost_filesystem !

正如你所看到的,它检测到一些图书馆很好,但它失败,升压文件系统。这些是内容〜/本地/ IIb的:

sb@stephane:~$ ls -1 /home/sb/local/lib/
libboost_filesystem.a
libboost_filesystem.so
libboost_filesystem.so.1.42.0
libboost_program_options.a
libboost_program_options.so
libboost_program_options.so.1.42.0
libboost_system.a
libboost_system.so
libboost_system.so.1.42.0
libboost_thread.a
libboost_thread.so
libboost_thread.so.1.42.0

因此,文库是存在的。我试着用升压1.39和升压1.42,没有不同的结果都,任何想法,为什么会出现这种情况?我是不是忘了什么?

有帮助吗?

解决方案

由于升压1.39 libboost_filesystem取决于libboost_system。 1.39之前,你只能链接到boost_filesystem,在以后的版本中,你必须链接这两者。

或许这是与您的错误。

其他提示

我发现 boost.m4 要远远超过可用的升压宏更稳健从Autoconf的宏存档。你可能有好运气只是迁移到boost.m4。

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top