我使用dcmtk-3.6.0来处理 DICOM 图像,并使用log4cplus-1.1.2作为日志库。g++ 编译器抱怨重新定义的错误,因为dcmtk-3.6.0还使用了以前版本的log4cplus作为日志库。
/usr/local/log4cplus-1.1.2/include/log4cplus/layout.h:72:28: error: redefinition of ‘class log4cplus::Layout’
/usr/include/dcmtk/oflog/layout.h:50:28: error: previous definition of ‘class log4cplus::Layout’
/usr/local/log4cplus-1.1.2/include/log4cplus/layout.h:103:28: error: redefinition of ‘class log4cplus::SimpleLayout’
/usr/include/dcmtk/oflog/layout.h:80:28: error: previous definition of ‘class log4cplus::SimpleLayout’
/usr/local/log4cplus-1.1.2/include/log4cplus/layout.h:158:28: error: redefinition of ‘class log4cplus::TTCCLayout’
有没有办法解决这个问题?