Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>There are a few issues here.</p> <p>It looks like your boost libraries have been built without <code>runtime-link=static</code> ie they aren't linked statically to the C++ Standard Library. If they had been, their names' postfixes should contain an <code>s</code> (see the <a href="http://www.boost.org/doc/libs/release/more/getting_started/unix-variants.html#library-naming" rel="nofollow" title="Boost documentation on library naming conventions">boost docs on library naming</a>)</p> <p>Another issue is that CMake's <a href="http://www.cmake.org/cmake/help/v2.8.11/cmake.html#module%3aFindBoost" rel="nofollow" title="CMake v2.8.11 documentation for &quot;FindBoost&quot; module"><code>FindBoost module</code></a> expects the <code>COMPONENTS</code> arguments to be of the form "date_time", "thread" rather than the full name as you have provided. </p> <p>Another more minor point is that you shouldn't need to set <code>Boost_INCLUDE_DIR</code> or <code>Boost_LIBRARY_DIR</code>; these are set by the CMake module if successful. Setting them shouldn't cause any problems however, it's just unnecessary clutter.</p> <p>Also, for <code>BOOST_ROOT</code>, <code>BOOST_INCLUDEDIR</code>, and <code>BOOST_LIBRARYDIR</code>, these would normally be set via the command line using the <a href="http://www.cmake.org/cmake/help/v2.8.11/cmake.html#opt%3a-Dvar%3atypevalue" rel="nofollow" title="CMake v2.8.11 documentation for &quot;-D&quot; command line option"><code>-D</code></a> option, or set as environment variables in order to avoid hard-coding paths specific to your machine into the CMakeLists.txt.</p> <p>The final point is that you should remove the <a href="http://www.cmake.org/cmake/help/v2.8.11/cmake.html#command%3alink_directories" rel="nofollow" title="CMake v2.8.11 documentation for &quot;link_directories&quot; command"><code>link_directories</code></a> call. Its own documentation discourages its use, and it's not needed since you're already passing the full paths to the boost libs in the <code>target_link_libraries</code> call.</p> <p>So, the final version should be more like:</p> <pre class="lang-none prettyprint-override"><code>#BOOST set(Boost_USE_STATIC_LIBS ON) set(USE_STATIC_BOOST ON) # Not sure if you really need this later. If not, delete. set(Boost_USE_STATIC_RUNTIME OFF) set(Boost_COMPILER -gcc) find_package(Boost COMPONENTS thread date_time REQUIRED) include_directories(${Boost_INCLUDE_DIRS}) #BOOSTEND add_executable(main main.cpp) target_link_libraries(main ${Boost_LIBRARIES}) </code></pre> <p>and you can invoke CMake like this:</p> <pre><code>cmake . -DBOOST_ROOT=&lt;path to root&gt; -DBOOST_INCLUDEDIR=... -DBOOST_LIBRARYDIR=... </code></pre>
    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.
 

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