c++ - Using gdcm libs in UE4 -
for ue4 project want use gdcm libraries c++ load ct scans. tried lot last few days i'm still not able use gdcm... error? can me?
- i created dll , lib files cmake (vs 2013 win64) successfully.
- i put libs in ...unreal projects\volumeimport\thirdparty\includes\gdcm\libraries
- i added each of 16 libs in volumeimport.build.cs publicadditionallibraries.add(path.combine(librariespath, "gdcmmsff.lib")); publicadditionallibraries.add(path.combine(librariespath, "gdcmcommon.lib")); ...
- i put header files in unreal projects\volumeimport\thirdparty\includes\gdcm\includes
- i set includepath location in project properties.
- i put dlls in c:\windows\system32
then used headers:
#include "volumeimport.h" #include <gdcmversion.h> #include <gdcmreader.h> #include <gdcmpixmapreader.h> #include <gdcmimagereader.h> #include <gdcmattributes.h> bool ctfileloader::convert_dicom() { /** ... other working code ... */ gdcm::trace::setdebug(false); gdcm::trace::seterror(true); gdcm::imagereader reader; reader.setfilename(files_to_process[i].c_str()); if(!reader.read()) { } } and error in gdcmmediastorage.h: "error c4515: 'gdcm': namespace uses itself."
i tried using different includes causes diffrent errors in diffrent headers... there wrong libraries? i'm sure added, because using gdcmtrace.h , gdcm::trace::functions works fine.
now got solution:
- in volumeimport.build.cs additionally added dlls: publicdelayloaddlls.add(path.combine(librariespath, "gdcmmsff.dll")); ...
- i changed gdcmmediastorage.h file: comment out "using namespace gdcm;"
- furthermore had dynamic_cast problems big library , needs enable rtti
Comments
Post a Comment