Pregunta

Estoy usando autoconf para detectar bibliotecas Boost, con el apoyo de la autoconf- macros de archivos y trabajan muy bien con las bibliotecas de impulso en todo el sistema, pero si fallan impulso de compilación manualmente en mi directorio:

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 !

Como se puede ver, se detecta cierta bibliotecas bien, pero no con la potencia extra-sistema de archivos. Estos son los contenidos de ~ / / lib locales:

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

Así que la biblioteca está allí. He intentado con tanto impulso-1,39 y 1,42 impulso sin resultado diferente, alguna idea de por qué sucede esto? ¿Se me olvidó algo?

¿Fue útil?

Solución

Desde impulso 1,39 libboost_filesystem depende de libboost_system. Antes de 1,39 sólo se podía enlazar a boost_filesystem, en versiones posteriores hay que enlace a los dos.

Tal vez tenga algo que ver con su error.

Otros consejos

boost.m4 a ser mucho más robusto que las macros disponibles Boost del Macro Autoconf Archivo. Es posible que tenga buena suerte simplemente migrar a boost.m4.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top