Search found 9 matches

by zardoz
Tue, 2023-03-07, 17:34
Forum: DCMTK - General
Topic: Minimal example (Linux) application using DCMTK with linking errors
Replies: 16
Views: 6577

Re: Minimal example (Linux) application using DCMTK with linking errors

Hi Marco, just some feedback ... I tried to compile the current master branch from GitHub with DCMTK_PORTABLE_LINUX_BINARIES turned on. DCMTK_ENABLE_CHARSET_CONVERSION was set to "oficonv" by default, but DCMTK still failed to compile (error message below). But after turning off DCMTK_WITH...
by zardoz
Mon, 2023-03-06, 23:37
Forum: DCMTK - General
Topic: Minimal example (Linux) application using DCMTK with linking errors
Replies: 16
Views: 6577

Re: Minimal example (Linux) application using DCMTK with linking errors

Ah, I see. Then I stay with dynamic linking and DCMTK_PORTABLE_LINUX_BINARIES off. Thanks again for all the help and explanations!

Best regards,
Kai
by zardoz
Mon, 2023-03-06, 17:00
Forum: DCMTK - General
Topic: Minimal example (Linux) application using DCMTK with linking errors
Replies: 16
Views: 6577

Re: Minimal example (Linux) application using DCMTK with linking errors

Thanks a lot! It finally compiles after adding icuuc to target_link_libraries :D Here is my final CMakeLists.txt: project(demo) cmake_minimum_required(VERSION 3.16) include_directories(/workspace/dcmtk-3.6.7-install/usr/local/include) link_directories(/workspace/dcmtk-3.6.7-install/usr/local/lib) ad...
by zardoz
Mon, 2023-03-06, 15:25
Forum: DCMTK - General
Topic: Minimal example (Linux) application using DCMTK with linking errors
Replies: 16
Views: 6577

Re: Minimal example (Linux) application using DCMTK with linking errors

Hm, that's strange. I use a fresh Ubuntu 20.04 install inside a (GitPod cloud IDE) Docker image and compile DCMTK with the default options (full output of compilation below). -- The C compiler identification is GNU 9.4.0 -- The CXX compiler identification is GNU 9.4.0 -- Check for working C compiler...
by zardoz
Mon, 2023-03-06, 14:36
Forum: DCMTK - General
Topic: Minimal example (Linux) application using DCMTK with linking errors
Replies: 16
Views: 6577

Re: Minimal example (Linux) application using DCMTK with linking errors

I just saw that dcmxml and oficonv were already in the target_link_libraries list. So I removed them completely (as those are not present in my lib dir): target_link_libraries(demo pthread dcmect dcmpmap dcmtract dcmseg dcmfg dcmiod dcmrt dcmpstat dcmqrdb dcmwlm dcmdsig cmr dcmsr dcmnet dcmtls dcmtk...
by zardoz
Mon, 2023-03-06, 14:07
Forum: DCMTK - General
Topic: Minimal example (Linux) application using DCMTK with linking errors
Replies: 16
Views: 6577

Re: Minimal example (Linux) application using DCMTK with linking errors

Now only two linking errors remain: [ 50%] Building CXX object CMakeFiles/demo.dir/demo.cc.o [100%] Linking CXX executable demo /usr/bin/ld: cannot find -ldcmxml /usr/bin/ld: cannot find -loficonv collect2: error: ld returned 1 exit status make[2]: *** [CMakeFiles/demo.dir/build.make:84: demo] Error...
by zardoz
Mon, 2023-03-06, 12:58
Forum: DCMTK - General
Topic: Minimal example (Linux) application using DCMTK with linking errors
Replies: 16
Views: 6577

Re: Minimal example (Linux) application using DCMTK with liniking errors

Ok, I moved add_executable directly after link_directory (but before target_link_libraries as otherwise it tells me that demo is not a valid target). Now I get a long list of undefined references: Scanning dependencies of target demo [ 50%] Building CXX object CMakeFiles/demo.dir/demo.cc.o [100%] Li...
by zardoz
Mon, 2023-03-06, 11:31
Forum: DCMTK - General
Topic: Minimal example (Linux) application using DCMTK with linking errors
Replies: 16
Views: 6577

Re: Minimal example (Linux) application using DCMTK with liniking errors

Hello Michael, thanks for helping out here. Unfortunately, I still get the same error. I double checked that it is the correct directory: message("here:" ${DCMTK_DIR}/lib) gives me here:/workspace/dcmtk-3.6.7-build/lib and ls /workspace/dcmtk-3.6.7-build/lib returns libcmr.a libdcmect.a li...
by zardoz
Mon, 2023-03-06, 10:32
Forum: DCMTK - General
Topic: Minimal example (Linux) application using DCMTK with linking errors
Replies: 16
Views: 6577

Minimal example (Linux) application using DCMTK with linking errors

Hello, I am trying to create a minimal example application using DCMTK, but I can't get it to compile correctly. I use Ubuntu 20.04 and compiled DCMTK successfully (some minor warnings only during compilation), as noted in the INSTALL file (with default cmake options). I created a minimal CMakeLists...