<span style="font-family:courier new,monospace">Hello,</span><br style="font-family:courier new,monospace"><br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace">I recently installed ITK v3 on a CentOS 6 machine using ccmake with the following options:</span><br style="font-family:courier new,monospace">


<br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace;color:rgb(51,51,255)">BUILD_DOXYGEN                         OFF</span><br style="font-family:courier new,monospace;color:rgb(51,51,255)">


<span style="font-family:courier new,monospace;color:rgb(51,51,255)">BUILD_EXAMPLES                        ON</span><br style="font-family:courier new,monospace;color:rgb(51,51,255)"><span style="font-family:courier new,monospace;color:rgb(51,51,255)">BUILD_SHARED_LIBS                     ON</span><br style="font-family:courier new,monospace;color:rgb(51,51,255)">


<span style="font-family:courier new,monospace;color:rgb(51,51,255)">BUILD_TESTING                         OFF</span><br style="font-family:courier new,monospace;color:rgb(51,51,255)"><span style="font-family:courier new,monospace;color:rgb(51,51,255)">CMAKE_BACKWARDS_COMPATIBILITY         2.0</span><br style="font-family:courier new,monospace;color:rgb(51,51,255)">


<span style="font-family:courier new,monospace;color:rgb(51,51,255)">CMAKE_BUILD_TYPE                      Release</span><br style="font-family:courier new,monospace;color:rgb(51,51,255)"><span style="font-family:courier new,monospace;color:rgb(51,51,255)">CMAKE_INSTALL_PREFIX                  /usr/local</span><br style="font-family:courier new,monospace;color:rgb(51,51,255)">


<span style="font-family:courier new,monospace"><span style="color:rgb(51,51,255)">ITK_USE_KWSTYLE                       OFF</span><br><br>After pressing c + g inside ccmake, I followed this up with sudo make, and sudo make install.<br>


<br>I next installed VTK with the following options:<br><br><span style="font-family:courier new,monospace;color:rgb(51,51,255)">BUILD_EXAMPLES</span><span style="color:rgb(51,51,255)">                      ON</span></span><br style="font-family:courier new,monospace;color:rgb(51,51,255)">


<span style="font-family:courier new,monospace;color:rgb(51,51,255)">BUILD_SHARED_LIBS                   ON<br>BUILD_TESTING                       ON<br>CMAKE_BACKWARDS_COMPATIBILITY       2.0<br>CMAKE_BUILD_TYPE                    Debug<br>


CMAKE_INSTALL_PREFIX                /usr/local<br>OpenQube_DIR                        OpenQube_DIR_NOTFOUND<br>QT_QMAKE_EXECUTABLE                 QT_QMAKE_EXECUTABLE-NOTFOUND<br>VTKMY_WRAP_TCL                      ON<br>


VTK_DATA_ROOT                       VTK_DATA_ROOT-NOTFOUND<br>VTK_EXTRA_COMPILER_WARNINGS         OFF<br>VTK_LARGE_DATA_ROOT                 VTK_LARGE_DATA_ROOT-NOTFOUND<br>VTK_USE_CHARTS                      ON<br>VTK_USE_CHEMISTRY                   ON<br>


VTK_USE_GEOVIS                      ON<br>VTK_USE_INFOVIS                     ON<br>VTK_USE_N_WAY_ARRAYS                ON<br>VTK_USE_PARALLEL                    ON<br>VTK_USE_QT                          OFF<br>VTK_USE_QTCHARTS                    OFF<br>


VTK_USE_RENDERING                   ON<br>VTK_USE_TEXT_ANALYSIS               OFF<br>VTK_USE_VIEWS                       ON<br>VTK_WRAP_JAVA                       OFF<br>VTK_WRAP_PYTHON                     OFF<br>VTK_WRAP_PYTHON_SIP                 OFF<br>


VTK_WRAP_TCL</span><span style="font-family:courier new,monospace"><span style="color:rgb(51,51,255)">                        ON</span><br><br>Again, after pressing c + g inside ccmake, I ran sudo make, and sudo make install. In retrospect, I probably should have set BUILD_TESTING to OFF and CMAKE_BUILD_TYPE to Release, but I don&#39;t think that this would have any bearing on the problem I am facing currently.<br>


<br>My next action was to create a new C++ project called ITKRegistration1 in my home directory, using NetBeans. Here is the code that is currently in main.cpp:<br><br><span style="color:rgb(51,51,255)">#include &lt;cstdlib&gt;</span><br style="color:rgb(51,51,255)">

<br style="color:rgb(51,51,255)"><span style="color:rgb(51,51,255)">using namespace std;</span><br style="color:rgb(51,51,255)"><br style="color:rgb(51,51,255)"><span style="color:rgb(51,51,255)">/*</span><br style="color:rgb(51,51,255)">

<span style="color:rgb(51,51,255)"> * </span><br style="color:rgb(51,51,255)"><span style="color:rgb(51,51,255)"> */</span><br style="color:rgb(51,51,255)"><span style="color:rgb(51,51,255)">int main(int argc, char** argv) {</span><br style="color:rgb(51,51,255)">

<br style="color:rgb(51,51,255)"><span style="color:rgb(51,51,255)">    return 0;</span><br style="color:rgb(51,51,255)"><span style="color:rgb(51,51,255)">}</span><br><br>I then tried to create a new Makefile using ccmake, by writing the following code in CMakeLists.txt:<br>

<br style="color:rgb(255,0,0)">
<span style="color:rgb(51,51,255)">cmake_minimum_required(VERSION 2.8)</span><br style="color:rgb(51,51,255)"><span style="color:rgb(51,51,255)">project(ITKRegistration1)</span><br style="color:rgb(51,51,255)"><span style="color:rgb(51,51,255)">add_executable(ITKRegistration1 main.cpp)</span><br style="color:rgb(51,51,255)">


<span style="color:rgb(51,51,255)">find_package(ITK)</span><br style="color:rgb(51,51,255)"><span style="color:rgb(51,51,255)">if (ITK_FOUND)</span><br style="color:rgb(51,51,255)"><span style="color:rgb(51,51,255)">    include_directories(${ITK_INCLUDE_DIRS})</span><br style="color:rgb(51,51,255)">

<span style="color:rgb(51,51,255)">
    target_link_libraries (ITKRegistration1 ${ITK_LIBRARIES})</span><br style="color:rgb(51,51,255)"><span style="color:rgb(51,51,255)">endif (ITK_FOUND)</span><br style="color:rgb(51,51,255)"><br style="color:rgb(51,51,255)">


<span style="color:rgb(51,51,255)">find_package(VTK)</span><br style="color:rgb(51,51,255)"><span style="color:rgb(51,51,255)">if (VTK_FOUND)</span><br style="color:rgb(51,51,255)"><span style="color:rgb(51,51,255)">    include_directories(${VTK_INCLUDE_DIRS})</span><br style="color:rgb(51,51,255)">

<span style="color:rgb(51,51,255)">
    target_link_libraries (ITKRegistration1 ${VTK_LIBRARIES})</span><br style="color:rgb(51,51,255)"><span style="color:rgb(51,51,255)">endif (VTK_FOUND)</span><br style="color:rgb(51,51,255)"><br>After hitting c + g, I tried running make, and I got the following error message:<br>

<br><span style="color:rgb(51,51,255)">Scanning dependencies of target ITKRegistration1</span><br style="color:rgb(51,51,255)"><span style="color:rgb(51,51,255)">[100%] Building CXX object CMakeFiles/ITKRegistration1.dir/main.cpp.o</span><br style="color:rgb(51,51,255)">

<span style="color:rgb(51,51,255)">Linking CXX executable ITKRegistration1</span><br style="color:rgb(51,51,255)"><span style="color:rgb(255,0,0)">/usr/bin/ld: cannot find -lITKAlgorithms</span><br style="color:rgb(255,0,0)">

<span style="color:rgb(255,0,0)">collect2: ld returned 1 exit status</span><br style="color:rgb(255,0,0)"><span style="color:rgb(255,0,0)">make[2]: *** [ITKRegistration1] Error 1</span><br style="color:rgb(255,0,0)"><span style="color:rgb(255,0,0)">make[1]: *** [CMakeFiles/ITKRegistration1.dir/all] Error 2</span><br style="color:rgb(255,0,0)">

<span style="color:rgb(255,0,0)">make: *** [all] Error 2</span><br style="color:rgb(255,0,0)"><br>In terminal, I ran the command: find /usr/local/itk -iname &quot;*.so&quot;, and there is a file called libITKAlgorithms.so located in /usr/local/itk/bin, so I am not sure why this error message is taking place. Have I missed a step during the installation of ITK? Is there something wrong with the code I wrote for CMakeLists.txt?<br>

<br>Any input would be appreciated, and thanks.<br><br>Nikhil Chandra<br>
</span>