[Ctk-developers] Link problem with DICOM/Qt5

Christian Askeland christian.askeland at gmail.com
Mon Oct 13 15:48:37 EDT 2014


Hi all CTK developers.

I have been using CTK for a few months now, integrating the DICOM and
plugins modules into our (still) in-house navigation system CustusX. We are
all very enthusiastic about the project, and we are in the process of
converting our codebase to the CTK plugin framework.

Lately we have ported our system to Qt5, and thus did the same change in
CTK. I found a few minor issues that broke the build and submitted a pull
request for them (#509).


There is one problem left: The DICOM examples won't run from the build
tree, when on MacOSX10.8. Ubuntu 14.04 works fine.

I build with the cmake command (using my own branch
git at github.com:SINTEFMedisinskTeknologi/CTK.git,
branch CTK-CX-modifications):

cmake ../CTK -DCTK_QT_VERSION:STRING=5 -DCTK_ENABLE_PluginFramework:BOOL=ON
-DCTK_ENABLE_DICOM:BOOL=ON -DCTK_BUILD_EXAMPLES:BOOL=ON

When running the ctkDICOM example app, it fails with the message

dyld: Library not loaded: libdcmpstat.dylib
  Referenced from: /Users/christiana/dev/CTK/build/CTK-build/bin/./ctkDICOM
  Reason: image not found
Trace/BPT trap: 5

Running otool gives:

[21:34:37 ~/dev/CTK/build/CTK-build/bin]$ otool -L ./ctkDICOM
./ctkDICOM:

/Users/christiana/dev/CTK/build/CTK-build/bin/libCTKDICOMWidgets.0.1.dylib
(compatibility version 0.1.0, current version 0.1.0)
    /Users/christiana/dev/CTK/build/CTK-build/bin/libCTKDICOMCore.0.1.dylib
(compatibility version 0.1.0, current version 0.1.0)
    libdcmpstat.dylib (compatibility version 0.0.0, current version 0.0.0)
    libdcmsr.dylib (compatibility version 0.0.0, current version 0.0.0)
    libdcmtls.dylib (compatibility version 0.0.0, current version 0.0.0)
    libdcmqrdb.dylib (compatibility version 0.0.0, current version 0.0.0)
    libdcmnet.dylib (compatibility version 0.0.0, current version 0.0.0)
    libdcmjpeg.dylib (compatibility version 0.0.0, current version 0.0.0)
    libdcmimage.dylib (compatibility version 0.0.0, current version 0.0.0)
    libdcmimgle.dylib (compatibility version 0.0.0, current version 0.0.0)
    libdcmdata.dylib (compatibility version 0.0.0, current version 0.0.0)
    liboflog.dylib (compatibility version 0.0.0, current version 0.0.0)
    libofstd.dylib (compatibility version 0.0.0, current version 0.0.0)
    libijg12.dylib (compatibility version 0.0.0, current version 0.0.0)
    libijg16.dylib (compatibility version 0.0.0, current version 0.0.0)
    libijg8.dylib (compatibility version 0.0.0, current version 0.0.0)
    /opt/local/Library/Frameworks/QtSql.framework/Versions/5/QtSql
(compatibility version 5.3.0, current version 5.3.1)
... (more OK libs)

As you can see, the DICOM libs are missing full paths and are thus not
found, while the CTK libs load normally.

I suspect the error is somehow connected to the new way of definining cmake
targets in cmake 2.11 and up (i use 3.0.2), but I cannot find the problem
in the CTK source, with which I am only somewhat familiar. Any help or
suggestions on how to proceed are welcome.

Best Regards,

Christian Askeland
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/ctk-developers/attachments/20141013/9243e122/attachment-0002.html>


More information about the Ctk-developers mailing list