2010-03-05 18 views
5

मैं autoconf उपयोग कर रहा हूँ autoconf-archive macros के समर्थन के साथ, को बढ़ावा देने पुस्तकालयों का पता लगाने और वे पूरे सिस्टम में बढ़ावा पुस्तकालयों के साथ अच्छा काम है, लेकिन विफल अगर मैं मैन्युअल रूप से मेरे घर निर्देशिका में बढ़ावा संकलन:क्यों ऑटोकॉन्फ ठीक से बूस्ट का पता लगाने का पता नहीं लगा रहा है?

[email protected]:~/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 ! 

आप कर सकते हैं के रूप में देखें, यह कुछ पुस्तकालयों को ठीक से पता लगाता है, लेकिन यह बूस्ट-फाइल सिस्टम के साथ विफल रहता है। ये ~/स्थानीय/lib की सामग्री हैं:

[email protected]:~$ 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.3 9 और बूस्ट-1.42 दोनों के साथ प्रयास किया, कोई विचार यह क्यों हो रहा है? क्या मैंने कुछ भूल लिया?

उत्तर

3

चूंकि बूस्ट-1.3 9 libboost_filesystem libboost_system पर निर्भर करता है। 1.3 9 से पहले आप केवल boost_filesystem से लिंक कर सकते हैं, बाद के संस्करणों में आपको दोनों को लिंक करना होगा।

शायद इसकी आपकी त्रुटि से कुछ करना है।

+0

आपका अनुमान सही है: बूस्ट-सिस्टम स्थापित है और config.ac में इसके लिए एक जांच है, लेकिन यह बूस्ट-फाइल सिस्टम की जांच के बाद थी। अगर मैं ऑर्डर स्विच करता हूं, तो सब कुछ इरादे से काम करता है। यह autoconf-archive – Kjir

+1

@Dmitry Yudakov में भी एक छोटा दस्तावेज़ प्रलेखन है, कृपया अपने कथन के लिए एक लिंक/संदर्भ प्रदान करें। – Qsiris

1

मुझे boost.m4 Autoconf मैक्रो पुरालेख से उपलब्ध बूस्ट मैक्रोज़ की तुलना में अधिक मजबूत होने के लिए मिला है। बूस्ट.एम 4 के लिए बस माइग्रेट करना अच्छा भाग्य हो सकता है।

संबंधित मुद्दे