DCMTK doesn't find zlib.lib etc

Compilation and installation of DCMTK

Moderator: Moderator Team

Post Reply
Message
Author
Bob666
Posts: 4
Joined: Mon, 2011-02-07, 14:26

DCMTK doesn't find zlib.lib etc

#1 Post by Bob666 »

Hi

I tried to compile DCTMK with zlib, tiff and png as a shared lib (BUILD_SHARED_LIBS), but dcmdata cannot find zlib.lib because the additional linker directories are empty. Is it possible that something such as

[code]# declare directories containing used libraries
LINK_DIRECTORIES(${dcmdata_BINARY_DIR} ${ofstd_BINARY_DIR} ${oflog_BINARY_DIR} ${ZLIB_LIBDIR} ${LIBICONV_LIBDIR} ${LIBXML_LIBDIR})[/code]

is missing, as it is in the apps and test CMakeLists.txt? (I took it from dcmdata\apps as an example)

I'm using VS2012, x64 and the snapshot dcmtk-3.6.1_20121102.tar.gz.

Thank you
Robert

Uli Schlachter
DCMTK Developer
Posts: 120
Joined: Thu, 2009-11-26, 08:15

Re: DCMTK doesn't find zlib.lib etc

#2 Post by Uli Schlachter »

Sure, that's possible.

The external libraries have only been tested as static libraries on windows. Linking against shared libs is only tested on unixoid systems where these libraries are found in the default library path. This means that this is likely broken and will only be fixed as time permits.

Sorry.

P.S.: I think some colleague is currently working on "CMakeification" of the external libraries so that they can be more easily integrated and build as DLLs. This would be a step into the right direction for making it possible to link against a zlib dll.

chaircrusher
Posts: 32
Joined: Tue, 2011-12-20, 23:24
Location: iowa city,ia

Re: DCMTK doesn't find zlib.lib etc

#3 Post by chaircrusher »

Uli Schlachter wrote: P.S.: I think some colleague is currently working on "CMakeification" of the external libraries so that they can be more easily integrated and build as DLLs. This would be a step into the right direction for making it possible to link against a zlib dll.
I don't know which colleague is doing this work, but the ITK and VTK libraries ( see itk.org, vtk.org) already build versions of the Zlib, Tiff, and Jpg libraries, including mangling the names of externals so that they don't conflict with the system versions of those libraries.

There are other ways to CMake-ify external libraries, including using CMake's ExternalProject module to download, configure, and build DCMTK's prerequisite libraries. I actually have something that will do this here:

https://github.com/Chaircrusher/dcmtk_cmake

Post Reply

Who is online

Users browsing this forum: Google [Bot] and 1 guest