我正在使用itk库来阅读我的.dcm文件,其示例位于:https://itk.org/Doxygen46/html/IO_2DicomImageReadWrite_8cxx-example.html。
当我使用CMake构建此示例时,它看起来一切正常,我可以例如以.png格式编写.dcm。但是当我使用Visual Studio(2015-2013-2010)时,我面临着这些错误:
LNK1120 4 unresolved externals
LNK2019 unresolved external symbol gethostname referenced in function "public: static bool __cdecl gdcm::System::GetHostName(char * const)" (?GetHostName@System@gdcm@@SA_NQEAD@Z)
LNK2019 unresolved external symbol WSACleanup referenced in function "public: static bool __cdecl gdcm::System::GetHostName(char * const)" (?GetHostName@System@gdcm@@SA_NQEAD@Z)
LNK2019 unresolved external symbol WSAStartup referenced in function "public: static bool __cdecl gdcm::System::GetHostName(char * const)" (?GetHostName@System@gdcm@@SA_NQEAD@Z) Read_Write
LNK2019 unresolved external symbol __imp_UuidCreate referenced in function "protected: static bool __cdecl gdcm::UIDGenerator::GenerateUUID(unsigned char *)" (?GenerateUUID@UIDGenerator@gdcm@@KA_NPEAE@Z)
gdcm似乎有问题。