gerddie / ginkgocadx

Advanced DICOM viewer
131 stars 38 forks source link

Current code incompatible with recent DCMTK #32

Closed pmattern closed 7 years ago

pmattern commented 7 years ago

Compiling Ginko CADx 3.8.4 against DCMTK snapshot 3.6.1_20170228 or commit 7dec4d56c fails with

/usr/local/peter/Tests/GinkgoCADx/Projekt/ginkgocadx-3.8.4/cadxcore/api/dicom/idicom.cpp: In member function ‘virtual DcmElement* GIL::DICOM::TagPrivadoString::ToElement(unsigned int, unsigned int)’:
/usr/local/peter/Tests/GinkgoCADx/Projekt/ginkgocadx-3.8.4/cadxcore/api/dicom/idicom.cpp:61:51: error: ‘newDicomElement’ was not declared in this scope
         DcmElement* pElement = newDicomElement(tag);
                                                   ^
/usr/local/peter/Tests/GinkgoCADx/Projekt/ginkgocadx-3.8.4/cadxcore/api/dicom/idicom.cpp: In member function ‘virtual DcmElement* GIL::DICOM::TagPrivadoUndefined::ToElement(unsigned int, unsigned int)’:
/usr/local/peter/Tests/GinkgoCADx/Projekt/ginkgocadx-3.8.4/cadxcore/api/dicom/idicom.cpp:157:51: error: ‘newDicomElement’ was not declared in this scope
         DcmElement* pElement = newDicomElement(tag);
                                                   ^
make[2]: *** [cadxcore/CMakeFiles/CADxCore.dir/build.make:1119: cadxcore/CMakeFiles/CADxCore.dir/api/dicom/idicom.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [CMakeFiles/Makefile2:119: cadxcore/CMakeFiles/CADxCore.dir/all] Error 2
make: *** [Makefile:128: all] Error 2

while compiling against snapshot 3.6.1_20161102 under the very same conditions otherwise succeeds.

gerddie commented 7 years ago

AFAICS newDicomElement has now become a static member of DcmItem, hence replacing newDicomElement by DcmItem::newDicomElement. A read fix should be backwards compatible though and test this in the cmake scripts.

pmattern commented 7 years ago

Confirming the problem is fixed in d6cbcab9 here as well, same conditions as those of the initial comment.