0

I am new with all of these Qt, Dcmtk and CMake and I am suppose to use it for a school project. A lot of things are available on the internet but essentially for Windows..

I am trying to link Dcmtk with Qt and make it run on my mac but It is not working, the error is:

Error output

Error output

I have already built dcmtk with CMake (note the CMake wasn't generating the right paths...)

I know this error seems recurrent and I should add a LIB += ... But I tried a lot of different one and I couldn't find anything that solve my problem according to linking dcmtk

Here is my current code according to some found online:

.pro file

.pro file

main.cpp

main.cpp

I am feeling a bit powerless right now if someone could enlighten me.

Thank you!

Levi Arista
  • 295
  • 1
  • 3
  • 13
Laura H
  • 1
  • 2
  • 2
    Please copy the actual error message, don't link a picture. And do show at least one of the lines you tried. – MSalters Jun 13 '18 at 14:59
  • Thank you I didn't know it was just linking the images, the error is "Undefined symbols for architecture x86_64" I think I am missing some LIB include but I don't really get how it works – Laura H Jun 13 '18 at 15:26
  • I tried : 1. LIBS += -L"C:\Program Files (x86)\DCMTK_1\lib" LIBS +=-ldcmimgle -ldcmdata -loflog -lofstd ... which is obviously for windows --- 2.LIBS += -framework AppKit LIBS += -framework CoreAudio LIBS += -framework AudioToolbox --- 3.DCMAKE_CXX_FLAGS="-stdlib=libstdc++" cmake -DCMAKE_CXX_FLAGS="-stdlib=libstdc++" --- 4. LIBS += "/Système/Bibliothèque/Frameworks/CoreFoundation.framework/Versions/A/Headers/CoreFoundation.h" – Laura H Jun 13 '18 at 15:31

1 Answers1

0

Did you forget to link with dcmimage?

try adding LIBS += -ldcmimage

Pieter
  • 1,191
  • 1
  • 11
  • 29
  • Also, the dcmtk forums mention that linking order is important, I use linking order: LIBS += -lofstd -ldcmdata -ldcmimgle -ldcmimage -loflog – Pieter Jun 14 '18 at 12:04
  • I tried to link as you say but I still have the same error. I wonder if some path aren't overlapping in my computer and lead to this error – Laura H Jun 19 '18 at 14:00