Compiling dcmtk for iOS

Created by Alin Brindusescu on 2012-06-04 11:50:15

The best open source option, on my opinion, for handling dicom files is the Dcmtk library.
Here are the steps i have followed in order to compile dctmk for iOS:

  • get the sources from the dcmtk repository:
    # git clone DCMTK 
    I had some problems to compile the dcmtk-3.6.0 release sources but everything went fine with the development sources. Since most of the time I could not reproduce the results of a tutorial most of the time because I could not find the exact packages here are the sources I have used.
  • Configure the project using cmake
  • Build for testing for mac
  • Go to project Build Settings and change the base SDK to Latest iOS
  • In the build settings change also the architecture to Standard armv7
  • In the Xcode find the osconfig.h file and comment the
    #define HAVE_LIBC_H 1
Pay attention to the files you want to include the dcmtk headers, the simplest way to stay away from troubles is to change the extension of the files from .m to .mm

Comments: work in progress!