[ITK] ITK ImageFileReader Example Library Not Loaded

Jeanna S. jeannasheen at gmail.com
Sat Aug 6 23:53:05 EDT 2016


Hello,

I am trying to run the ITK ImageFileReader example (here
<https://itk.org/Wiki/ITK/Examples/IO/ImageFileReader>). CMake can
successfully configure and generate the executable, but when I try to run
the executable, I get the following error:

dyld: Library not loaded: libvtkDomainsChemistryOpenGL2-7.0.1.dylib

  Referenced from:
/Users/JJ/Desktop/ITKstuffs/ImageFileReader/build/ImageFileReader.app/Contents/MacOS/./ImageFileReader

  Reason: image not found

Trace/BPT trap: 5

A search of the files on my computer reveals that
libvtkDomainsChemistryOpenGL2-7.0.1.dylib is in
/Users/JJ/Desktop/ITKstuffs/Install/vtk/lib.

I can open the executable file generated by CMake in my text editor, and I
think I found where libvtkDomainsChemistryOpenGL2-7.0.1.dylib is being
referenced. There are 2 lines that state:

0 /usr/lib/libz.1.dylib

H libvtkDomainsChemistryOpenGL2-7.0.1.dylib

I do not know why the program is looking for the libraries in user/lib,
because when I configured and generated the code in CMake I changed
the CMAKE_INSTALL_PREFIX
to /Users/JJ/Desktop/ITKstuffs/Install.

If anyone has any suggestions on how to fix this problem, they would be
much appreciated.

I would also like to know where to put the image file to be read and how to
tell the program where the image to be read is (e.g. do I pass the file
name and path when I run the executable?).

Thanks in advance.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/community/attachments/20160806/71e886d6/attachment.html>


More information about the Community mailing list