Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I wrote a single file containing a single include directive:</p> <pre><code>#include &lt;boost/thread.hpp&gt; </code></pre> <ul> <li><code>g++-4.5.4 -std=c++0x -I /usr/include/boost-1_42 -c</code> gave the errors you mention.</li> <li><code>g++-4.6.3 -std=c++0x -I /usr/include/boost-1_42 -c</code> the same</li> <li><code>g++-4.7.1 -std=c++0x -I /usr/include/boost-1_42 -c</code> gave even more errors</li> <li><code>g++-4.7.1 -std=c++0x -I /usr/include/boost-1_49 -c</code> has not a single error</li> <li><code>g++-4.6.3</code> and <code>g++-4.5.4</code> also work without error using boost 1.49</li> </ul> <p>So I'd really suggest you use a more recent version of boost for this. You don't have to install it system-wide, but instead can install it for a single user. So you are not dependent on ubuntu packages.</p> <p>To manually install boost, I suggest you follow the <a href="http://www.boost.org/doc/libs/1_50_0/more/getting_started/unix-variants.html" rel="nofollow">Getting Started on Unix Variants</a> guide:</p> <ol> <li>Untar <a href="http://sourceforge.net/projects/boost/files/boost/1.50.0/" rel="nofollow"><code>boost_1_50_0.tar.bz2</code></a> to some temporary source directory and <code>cd</code> into that</li> <li><a href="http://www.boost.org/doc/libs/1_50_0/more/getting_started/unix-variants.html#easy-build-and-install" rel="nofollow">Build and install</a> using <code>./bootstrap.sh --prefix=${HOME}/boost_1_50 &amp;&amp; ./b2 install</code></li> <li><a href="http://www.boost.org/doc/libs/1_50_0/more/getting_started/unix-variants.html#build-a-simple-program-using-boost" rel="nofollow">Compile</a> your application using <code>-I ${HOME}/boost_1_50</code> to get correct headers</li> <li>Include <code>${HOME}/boost_1_50/lib/libboost_thread.a</code> as an argument when <a href="http://www.boost.org/doc/libs/1_50_0/more/getting_started/unix-variants.html#link-your-program-to-a-boost-library" rel="nofollow">linking</a> your application</li> </ol> <p>Using the static <code>libboost_thread.a</code> as opposed to the dynamic <code>libbtoost_thread.so</code> will ensure that you don't have to worry about locating libraries to launch your application. Everything from boost which you need will be included in your main binary.</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.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      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