Eike,<br><br>I have changed the version from 1.46 to 1.46.0 and removed the link_directories() command, then run the command as follows:<br><br>$ cmake -DBoost_DEBUG=On ~/GITROOT/BGLCMakeQuestion<br>-- The C compiler identification is GNU<br>

-- The CXX compiler identification is GNU<br>-- Check for working C compiler: /usr/bin/gcc<br>-- Check for working C compiler: /usr/bin/gcc -- works<br>-- Detecting C compiler ABI info<br>-- Detecting C compiler ABI info - done<br>

-- Check for working CXX compiler: /usr/bin/c++<br>-- Check for working CXX compiler: /usr/bin/c++ -- works<br>-- Detecting CXX compiler ABI info<br>-- Detecting CXX compiler ABI info - done<br>-- [ /usr/share/cmake-2.8/Modules/FindBoost.cmake:468 ] Boost not in cache<br>

-- [ /usr/share/cmake-2.8/Modules/FindBoost.cmake:471 ] _boost_TEST_VERSIONS = 1.46.1;1.46.0;1.46<br>-- [ /usr/share/cmake-2.8/Modules/FindBoost.cmake:473 ] Boost_USE_MULTITHREADED = TRUE<br>-- [ /usr/share/cmake-2.8/Modules/FindBoost.cmake:475 ] Boost_USE_STATIC_LIBS = <br>

-- [ /usr/share/cmake-2.8/Modules/FindBoost.cmake:477 ] Boost_USE_STATIC_RUNTIME = <br>-- [ /usr/share/cmake-2.8/Modules/FindBoost.cmake:479 ] Boost_ADDITIONAL_VERSIONS = <br>-- [ /usr/share/cmake-2.8/Modules/FindBoost.cmake:481 ] Boost_NO_SYSTEM_PATHS = <br>

-- [ /usr/share/cmake-2.8/Modules/FindBoost.cmake:544 ] Declared as CMake or Environmental Variables:<br>-- [ /usr/share/cmake-2.8/Modules/FindBoost.cmake:546 ]   BOOST_ROOT = <br>-- [ /usr/share/cmake-2.8/Modules/FindBoost.cmake:548 ]   BOOST_INCLUDEDIR = <br>

-- [ /usr/share/cmake-2.8/Modules/FindBoost.cmake:550 ]   BOOST_LIBRARYDIR = <br>-- [ /usr/share/cmake-2.8/Modules/FindBoost.cmake:552 ] _boost_TEST_VERSIONS = 1.46.1;1.46.0;1.46<br>-- [ /usr/share/cmake-2.8/Modules/FindBoost.cmake:605 ] Include debugging info:<br>

-- [ /usr/share/cmake-2.8/Modules/FindBoost.cmake:607 ]   _boost_INCLUDE_SEARCH_DIRS = C:/boost/include;C:/boost;/boost/include;/boost;/sw/local/include<br>-- [ /usr/share/cmake-2.8/Modules/FindBoost.cmake:609 ]   _boost_PATH_SUFFIXES = boost-1_46_1;boost_1_46_1;boost-1_46_0;boost_1_46_0;boost-1_46;boost_1_46<br>

-- [ /usr/share/cmake-2.8/Modules/FindBoost.cmake:634 ] location of version.hpp: /usr/include/boost/version.hpp<br>-- [ /usr/share/cmake-2.8/Modules/FindBoost.cmake:653 ] version.hpp reveals boost 1.46.1<br>-- [ /usr/share/cmake-2.8/Modules/FindBoost.cmake:744 ] guessed _boost_COMPILER = -gcc46<br>

-- [ /usr/share/cmake-2.8/Modules/FindBoost.cmake:754 ] _boost_MULTITHREADED = -mt<br>-- [ /usr/share/cmake-2.8/Modules/FindBoost.cmake:797 ] _boost_RELEASE_ABI_TAG = -<br>-- [ /usr/share/cmake-2.8/Modules/FindBoost.cmake:799 ] _boost_DEBUG_ABI_TAG = -d<br>

-- [ /usr/share/cmake-2.8/Modules/FindBoost.cmake:842 ] _boost_LIBRARY_SEARCH_DIRS = /usr/include/lib;/usr/include/../lib;/usr/include/stage/lib;C:/boost/lib;C:/boost;/boost/boost_1_46_1/lib;/boost/boost_1_46/lib;/boost/lib;/boost;/sw/local/lib<br>

-- [ /usr/share/cmake-2.8/Modules/FindBoost.cmake:913 ] Searching for GRAPH_LIBRARY_RELEASE: boost_graph-gcc46-mt-1_46_1;boost_graph-gcc46-mt;boost_graph-mt-1_46_1;boost_graph-mt;boost_graph<br>-- [ /usr/share/cmake-2.8/Modules/FindBoost.cmake:945 ] Searching for GRAPH_LIBRARY_DEBUG: boost_graph-gcc46-mt-d-1_46_1;boost_graph-gcc46-mt-d;boost_graph-mt-d-1_46_1;boost_graph-mt-d;boost_graph-mt;boost_graph<br>

-- [ /usr/share/cmake-2.8/Modules/FindBoost.cmake:913 ] Searching for REGEX_LIBRARY_RELEASE: boost_regex-gcc46-mt-1_46_1;boost_regex-gcc46-mt;boost_regex-mt-1_46_1;boost_regex-mt;boost_regex<br>-- [ /usr/share/cmake-2.8/Modules/FindBoost.cmake:945 ] Searching for REGEX_LIBRARY_DEBUG: boost_regex-gcc46-mt-d-1_46_1;boost_regex-gcc46-mt-d;boost_regex-mt-d-1_46_1;boost_regex-mt-d;boost_regex-mt;boost_regex<br>

-- [ /usr/share/cmake-2.8/Modules/FindBoost.cmake:1055 ] Boost_FOUND = TRUE<br>-- Boost version: 1.46.1<br>-- Found the following Boost libraries:<br>--   graph<br>--   regex<br>-- Configuring done<br>-- Generating done<br>

-- Build files have been written to: /home/ajg23/GITROOT/BGLCMakeQuestion/build<br><br>Sorry, I still don&#39;t get it...<br><br><br><div class="gmail_quote">On Wed, Feb 1, 2012 at 3:46 AM, Rolf Eike Beer <span dir="ltr">&lt;<a href="mailto:eike@sf-mail.de">eike@sf-mail.de</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">&gt; Hi all,<br>
&gt;<br>
&gt; I have been trying to compile a very simple example with cmake (2.8.5) and<br>
&gt; boost, and I can&#39;t get what I am doing wrong...<br>
&gt;<br>
&gt; CMakeLists.txt<br>
&gt; ----------------------<br>
&gt;<br>
&gt; cmake_minimum_required(VERSION 2.6)<br>
&gt;<br>
&gt; project(ReadGraph)<br>
&gt;<br>
&gt; find_package(Boost 1.46 COMPONENTS graph regex )<br>
<br>
</div>Maybe you need to add 1.46.0 here?<br>
<br>
&gt; link_directories(${Boost_LIBRARY_DIRS})<br>
<br>
This is wrong. You don&#39;t need link_directories().<br>
<div class="im"><br>
&gt; include_directories(BEFORE ${Boost_INCLUDE_DIRS})<br>
&gt;<br>
&gt; add_executable(ReadGraph ReadGraph.cpp)<br>
&gt; target_link_libraries(ReadGraph ${Boost_LIBRARIES} )<br>
&gt; # target_link_libraries(ReadGraph boost_graph boost_regex )<br>
<br>
</div>Please use a clean build directory and add &quot;-D Boost_DEBUG=On&quot; to your<br>
command line. Then look at the configuration output. If you do not find<br>
what&#39;s going wrong paste it here.<br>
<span class="HOEnZb"><font color="#888888"><br>
Eike<br>
</font></span></blockquote></div><br>