Building DCMTK as shared libraries

Originally, the predecessor of the DCMTK started as one of the first two prototype implementations of the DICOM network services, an image server that was called “European CTN” (Central Test Node). At that time, there were no plans for a general DICOM toolkit, so the support for building shared libraries instead of static ones didn’t have high priority. This did not change too much in the following years. Later on, we added an entry to the FAQ explaining how to create “DCMTK libraries as shared objects (.so-files)” for Unix systems using GNU autoconf. However, we never added support for GNU libtool, which would have made life easier and the creation of shared objects more portable.

Only recently, we started to use CMake for building DCMTK as shared libraries. In a first step, we added support for one part of the operating system world: Unix and its derivatives. This was relatively easy because it only required the definition of one of the many CMake variables (in this case BUILD_SHARED_LIBS). The Windows part (also known as the “DLL hell” — for good reasons)  is more complex. It requires to explicitly mark all classes and other global definitions with some specifier. With the assistance of a dedicated DCMTK user who wrote a script that automates large portions of this task, we are almost through all modules. If you are interested in the current progress, watch the public git repository or wait for the next snapshot.

So, we opened the door to the hell but we hope that the DCMTK users can stand the heat 🙂

This entry was posted in DICOM, English and tagged , , , . Bookmark the permalink.

Leave a Reply