[ITK] [ITK-users] linker problem

Matt McCormick matt.mccormick at kitware.com
Mon Apr 20 15:57:07 EDT 2015


Hi Johannes,

Welcome to ITK!

If there is an unknown problem with the build, then the most reliable
approach may be to delete the build tree and do a fresh build. In your
CMake configuration, turn off BUILD_TESTING and BUILD_EXAMPLES for a
faster build.

Hope this helps,
Matt

On Mon, Apr 20, 2015 at 5:53 AM,  <JohannesWeber at gmx.at> wrote:
> Hello!
>
> For a while now I have troubles with the itk libaries. I am working on
> windows with visual studio 2012 express. I generate my project with cmake
> and than start the visual studio sln file. If I now want to build it, it
> says it can't find the "itkdouble-conversion.lib". If I take look into the
> projects properties, configuration properties, linker, input and additinonal
> dependencies (I am translating those terms from the german version, but I
> hope it is clear what I mean) than there are among others the itk entries,
> but they seem to be wrong. For other correct working projects generated with
> cmake the itk libaries are there with the full correct path like
> C:\ITK\Build\lib\Release\itkdouble-conversion-4.7.lib.
>
> So in the "broken" project the lib entry is only "itkdouble-conversion.lib"
> but it should be "C:\ITK\Build\lib\Release\itkdouble-conversion-4.7.lib"
>
> sometimes it works, sometimes not and I can not find out what the problem
> is. At the moment I am stuck because the project always has the wrong
> paths/dependencies. The cmake file is always the same, I never changed
> anything!
>
> # This is the root ITK CMakeLists file.
> cmake_minimum_required(VERSION 2.4)
> if(COMMAND CMAKE_POLICY)
>   cmake_policy(SET CMP0003 NEW)
> endif()
>
> # This project is designed to be built outside the Insight source tree.
> project(project)
> # Find ITK.
> find_package(ITK REQUIRED)
> include(${ITK_USE_FILE})
> add_executable(projectBME main.cxx Thickness.h Thickness.cxx DistanceRidge.h
> DistanceRidge.cxx SurfaceCleanUp.h SurfaceCleanUp.cxx Statistic.h
> Statistic.cxx)
> target_link_libraries(projectBME ${ITK_LIBRARIES})
>
> The problem was with cmake 3.2.1 and just before I installed the newest
> version of cmake 3.2.2 and it is the same.
> Don't know if that is maybe the reason, but I am working on two different
> PCs, the source folder is on dropbox, the build folder with the visual
> studio project is local on the PC on the desktop. But at the beginning
> everything worked fine and just for a while now when I am generating the
> project with cmake than I am getting the linker error.
>
> Thanks a lot!
>
> greetings
>
> _____________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Kitware offers ITK Training Courses, for more information visit:
> http://www.kitware.com/products/protraining.php
>
> Please keep messages on-topic and check the ITK FAQ at:
> http://www.itk.org/Wiki/ITK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/insight-users
>
_____________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html

Kitware offers ITK Training Courses, for more information visit:
http://www.kitware.com/products/protraining.php

Please keep messages on-topic and check the ITK FAQ at:
http://www.itk.org/Wiki/ITK_FAQ

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/insight-users


More information about the Community mailing list