Note that there are some explanatory texts on larger screens.

plurals
  1. POboost::asio::streambuf -- linker error
    primarykey
    data
    text
    <p>I'm having trouble getting a boost program to compile. The example I'm trying to compile is here: <a href="http://rosettacode.org/wiki/Web_scraping#C.2B.2B" rel="nofollow noreferrer">http://rosettacode.org/wiki/Web_scraping#C.2B.2B</a></p> <p>This is what happens when I try to compile:</p> <pre><code> % g++ -Wall test.c -lboost_regex -lboost_system -lboost_thread /tmp/ccJSxOji.o: In function `boost::exception_detail::error_info_injector&lt;std::length_error&gt;::error_info_injector(boost::exception_detail::error_info_injector&lt;std::length_error&gt; const&amp;)': test.c:(.text._ZN5boost16exception_detail19error_info_injectorISt12length_errorEC2ERKS3_[_ZN5boost16exception_detail19error_info_injectorISt12length_errorEC5ERKS3_]+0x53): undefined reference to `std::length_error::~length_error()' /tmp/ccJSxOji.o: In function `boost::exception_detail::error_info_injector&lt;std::length_error&gt;::~error_info_injector()': test.c:(.text._ZN5boost16exception_detail19error_info_injectorISt12length_errorED2Ev[_ZN5boost16exception_detail19error_info_injectorISt12length_errorED5Ev]+0x2e): undefined reference to `std::length_error::~length_error()' collect2: ld returned 1 exit status </code></pre> <p>I think I've narrowed the problem down to this line:</p> <pre><code>boost::asio::streambuf response ; </code></pre> <p>I'm using gcc 4.6.0, linux of course:</p> <pre><code>% gcc -v Using built-in specs. COLLECT_GCC=gcc COLLECT_LTO_WRAPPER=/usr/lib/gcc/i686-pc-linux-gnu/4.6.0/lto-wrapper Target: i686-pc-linux-gnu Configured with: /build/src/gcc-4.6-20110429/configure --prefix=/usr --libdir=/usr/lib --libexecdir=/usr/lib --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=https://bugs.archlinux.org/ --enable-languages=c,c++,ada,fortran,go,lto,objc,obj-c++ --enable-shared --enable-threads=posix --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-clocale=gnu --enable-gnu-unique-object --enable-linker-build-id --with-ppl --enable-cloog-backend=isl --enable-lto --enable-gold --enable-ld=default --enable-plugin --with-plugin-ld=ld.gold --disable-multilib --disable-libstdcxx-pch --enable-checking=release Thread model: posix gcc version 4.6.0 20110429 (prerelease) (GCC) </code></pre> <p>Possibly related thread:</p> <p><a href="https://stackoverflow.com/questions/4971980/problem-with-boostasiostreambuf">Code using boost::asio::streambuf causes segfault</a></p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload