【发布时间】:2016-05-11 14:37:24
【问题描述】:
到目前为止,我已经看到很多建议通过包含缺少的库来解决此问题的帖子。这在我的情况下不起作用。
我正在尝试将我的项目链接到 ITK (v4.9)。 在调试和发布模式下,ITK 的编译都很好。然后我建立了项目 INSTALL 和 BAM,所有的库和 .h 文件都在一个位置。
项目在 Visual Studio 2012 中编译。
我将文件夹 /ITK/include/ 包含在包含字段中,将 /ITK/lib/ 作为附加依赖项的目录,并将 .lib(s) 列表包含在附加依赖项中。
结果?不工作。
Error 1 error LNK2019: unresolved external symbol gethostbyname
referenced in function "public: int __cdecl
itksys::SystemInformationImplementation::GetFullyQualifiedDomainName
(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > &)" (?GetFullyQualifiedDomainName@SystemInformationImplementation@itksys@@QEAAHAEAV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z)
GetHostname、GetProcessMemoryInfo、GetProcMemoryUsed 出现同样的错误
我应该知道什么?
感谢您的帮助。
【问题讨论】:
标签: c++ visual-studio itk