Compile DCMTK on Mac OS X
- Install Fink first
- Note: There is no binary installer forMac OS X Leopard yet. You have to install from source.
- run fink install dcmtk
- It will failed with following error:
/usr/include/bsm/audit.h:219: error: expected %<;%> before '*' token
/usr/include/bsm/audit.h:229: error: expected %<;%> before '*' token
/usr/include/sys/ucred.h:76: error: 'u_long' does not name a type
/usr/include/sys/ucred.h:95: error: 'u_int' does not name a type
/usr/include/sys/attr.h:69: error: 'u_short' does not name a type
/usr/include/sys/attr.h:365: error: 'u_long' does not name a type
/usr/include/sys/attr.h:377: error: 'u_char' does not name a type
make[2]: *** [dcpixseq.o] Error 1
make[1]: *** [libsrc-all] Error 2
make: *** [dcmdata-install] Error 2
- You fix the problem by:
- vi /sw/src/fink.build/dcmtk-3.5.4-1001/dcmtk-3.5.4/config/Makefile.def
- change corresponding lines to:
- vi /sw/src/fink.build/dcmtk-3.5.4-1001/dcmtk-3.5.4/config/Makefile.def
CFLAGS = -O -I/app/sw/include/libxml2 -I/app/sw/include -D_REENTRANT -D_XOPEN_SOURCE_EXTENDED -D_BSD_SOURCE -D_BSD_COMPAT -D_OSF_SOURCE
CXXFLAGS = -O -I/app/sw/include/libxml2 -I/app/sw/include -D_REENTRANT -D_XOPEN_SOURCE_EXTENDED -D_BSD_SOURCE -D_BSD_COMPAT -D_OSF_SOURCE
- run cd /sw/src/fink.build/dcmtk-3.5.4-1001/dcmtk-3.5.4/; make all; make install, and it should work.
See also:
# Building DCMTK using Mac OSX 10.5
# The OFFIS Dicom Toolkit dcmtk 3.5.4 on MacOS X 10.4/10.3(Darwin)
# Compiling dcmtk 3.5.3 on OSX (gcc 4.0)
page_revision: 6, last_edited: 1214358728|%e %b %Y, %H:%M %Z (%O ago)





