Build HelloWorld error

Build Env.:
MacOS: 10.13.6
Xcode: 10.1
ITK: ITK 5.0 Release Candidate 2

! Apple Mach-O Linder(id) Error
!Linker command failed with exit code 1(use -v to see invocation)

ld: library not found for -litkdouble-conversion
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Can someone help me this?

Hello @yinpeter,

Did ITK build successfully and did the build complete? This error may be possible if the itkdouble-conversion library was not completely built.

Hi Matt,

I have built ITK 5.0 completely with no error.
Attached, the “libitkdouble-conversion-5.0.a” is built well.

Can more details be provided on the process used to create the hello world?


ITK 5.0:

  1. I use CMake to config/generate the ITK 5.0 Xcode project
  2. To Build library in Xcode with no error.


  1. Find the HelloWorld resource in ITK 5.0 directory.

  2. Use CMake to config/generate the Xcode project:
    —2.1 set the ITK_DIR to ITK 5.0 binary directory
    —2.2 config/generate the Xcode project

  3. Build the Xcode project with too many issue:
    —3.1Modify the CMakeLists.txt as Dzenanz suggested
    set(CMAKE_CXX_STANDARD 11) # Supported values are 11, 14, and 17.
    —3.2 rebuild the Xcode project
    —3.3 then face the error as I listed

If there is any deficiency, please let me know, thanks!

Hi Matt,

I try to build ITK4.13.2/ITK5.0 and run HelloWorld carefully today, record the entire execution process of HelloWorld in detail.

Using ITK 4.13.2:

Using ITK 5.0:

  • Configure ITK in CMake with no issue.

  • Generate ITK Xcode project in CMake with no issue.

  • Build ITK library in Xcode with no issue, all targets/libraries have been built successfully.

  • Confiure HelloWorld in CMake with no issue.

  • Generate HelloWorld project in CMake with no issue.

  • Build HelloWorld project in Xcode with no issue and running result is normal.

in conclusion

  • Is it correct to use xcode to develop an ITK project on MacOS?
1 Like

The try-compile “issues” (ITK-4.13.2-Binary-Config-Issues-In-CMake.txt) are not important, they are checked so proper configuration (ITK-build\Modules\Core\Common\itkConfigure.h) can be made. Most people who develop on a Mac use XCode.

Which hello world example were you following, this or this? Can you supply CMakeLists.txt for your hello-world project? And your latest message is not quite clear to me: did everything work besides some warnings, or are you still failing to build your example?

Hi Dzenanz,

Many thanks for your reply!

Today, I delete all the resources and re-downland everything from beginning.
Everything works fine under ITK5.0 as I mentioned, I will use it to continue study/plan my project, and give up to study ITK4.13.2

Attached is my HelloWorld’s CMakeLists.txt:
CMakeLists.txt (704 Bytes)

Thank you again!

Peter Yin


Hi Dzenanz,

Could you please recommend me:
1, Open-source free ITK GUI solution for MAC?
2.From there, start researching ITK?

Thanks a lot!


3D Slicer is an open and extensible research platform which uses ITK for image processing.

ITK-SNAP is ITK-based image viewer and segmentation tool, which also includes registration since recently.

thanks Dzenanz!

Hi Dzenanz,

Mimics is ITK-based application too, right?


Quite possibly, but Mimics is paid software.

Hi Dzenanz,

When I go through ITK-SNAP web-site, I can not find documents for developer, Could you please point me to find the documents?

Peter Yin

The support page, and developer list resolves to here:!forum/itksnap-dev

And as far as I am aware, ITK-SNAP is an end user application. It is not meant to be extended like Slicer, so there is no “developer documentation”.

Thank you for your reply.

Hi Dzenanz,

I plan to use ITK library with Mac OSX Xcode and objective-c, are there any resources/examples for doing so?

Peter Yin

ITK is written in C++. Can an ObjC program link to a C++ library?

This tutorial could get you started on CMake+XCode. There is the software guide, and Sphinx examples. Also many other resources, but this should be enough to get you started.

1 Like

Many thanks for your valuable reply!