[ITK-users] linker problem

Johannes Weber johannesweber at gmx.at
Sat Apr 25 12:50:50 EDT 2015


Hi!

I built ITK new and now it is working again... it is strange, because I 
never changed anything in the build. But ok, so far so good... maybe it 
has something to do with including the examples or testing. Anyway, I 
hope this problem does not occur again.
Thank you!

Kind regards,
Johannes

Am 20.04.2015 um 23:01 schrieb Matt McCormick:
> Hi,
>
> Is the configuration type in Visual Studio consistent between ITK and
> your project? There is usually a dropdown that has "Debug", "Release",
> etc.  If this is a problem, then limit the types available in the
> CMAKE_CONFIGURATION_TYPES CMake variable to a single type -- they will
> always be compatible in this case.
>
> HTH,
> Matt
>
> On Mon, Apr 20, 2015 at 4:21 PM, Johannes Weber <johannesweber at gmx.at> wrote:
>> Hi!
>>
>> thank you for your reply!
>>
>> The build from ITK itself is ok and working! The problem occurs when I am
>> generating my own project with cmake. But the problem was not from the
>> beginning on... when I started working with ITK everything was fine. Then
>> this problem occured... than it worked again, than again dont and so on...
>> I tried very often to delete the build folder and generate it new, tried
>> other paths, copying the source folder somewhere else, including more or
>> less files in the project (with the cmake file), ... it is stopping me from
>> productive working now for a while and I can not figure out what the problem
>> is.
>>
>>
>> Am 20.04.2015 um 21:57 schrieb Matt McCormick:
>>> 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
>>>>



More information about the Insight-users mailing list