我在QT中链接来自ITK的库并使用QTCreator构建它时遇到问题。我得到以下的erorrs。很高兴知道你对这个问题的指导。
:\Qt\qtcreator-2.8.1\bin\jom.exe -f Makefile.Release
link /LIBPATH:"c:\Qt\Qt4.8.3\lib" /NOLOGO /INCREMENTAL:NO /SUBSYSTEM:WINDOWS /OUT:release\ImageRegistration.exe @C:\Users\Venky\AppData\Local\Temp\ImageRegistration.exe.5976.47.jom
Creating library release\ImageRegistration.lib and object release\ImageRegistration.exp
ITKCommon-4.4.lib(itkWin32OutputWindow.obj) : error LNK2019: unresolved external symbol __imp_GetStockObject referenced in function "protected: static int __cdecl itk::Win32OutputWindow::Initialize(void)" (?Initialize@Win32OutputWindow@itk@@KAHXZ)
ITKCommon-4.4.lib(itkWin32OutputWindow.obj) : error LNK2019: unresolved external symbol __imp_SendMessageA referenced in function "protected: static void __cdecl itk::Win32OutputWindow::AddText(char const *)" (?AddText@Win32OutputWindow@itk@@KAXPEBD@Z)
ITKCommon-4.4.lib(itkWin32OutputWindow.obj) : error LNK2019: unresolved external symbol __imp_DefWindowProcA referenced in function "public: static __int64 __cdecl itk::Win32OutputWindow::WndProc(struct HWND__ *,unsigned int,unsigned __int64,__int64)" (?WndProc@Win32OutputWindow@itk@@SA_JPEAUHWND__@@I_K_J@Z)
ITKCommon-4.4.lib(itkWin32OutputWindow.obj) : error LNK2019: unresolved external symbol __imp_RegisterClassA referenced in function "protected: static int __cdecl itk::Win32OutputWindow::Initialize(void)" (?Initialize@Win32OutputWindow@itk@@KAHXZ)
ITKCommon-4.4.lib(itkWin32OutputWindow.obj) : error LNK2019: unresolved external symbol __imp_GetClassInfoA referenced in function "protected: static int __cdecl itk::Win32OutputWindow::Initialize(void)" (?Initialize@Win32OutputWindow@itk@@KAHXZ)
ITKCommon-4.4.lib(itkWin32OutputWindow.obj) : error LNK2019: unresolved external symbol __imp_CreateWindowExA referenced in function "protected: static int __cdecl itk::Win32OutputWindow::Initialize(void)" (?Initialize@Win32OutputWindow@itk@@KAHXZ)
ITKCommon-4.4.lib(itkWin32OutputWindow.obj) : error LNK2019: unresolved external symbol __imp_DestroyWindow referenced in function "protected: virtual __cdecl itk::Win32OutputWindow::~Win32OutputWindow(void)" (??1Win32OutputWindow@itk@@MEAA@XZ)
ITKCommon-4.4.lib(itkWin32OutputWindow.obj) : error LNK2019: unresolved external symbol __imp_ShowWindow referenced in function "protected: static int __cdecl itk::Win32OutputWindow::Initialize(void)" (?Initialize@Win32OutputWindow@itk@@KAHXZ)
ITKCommon-4.4.lib(itkWin32OutputWindow.obj) : error LNK2019: unresolved external symbol __imp_MoveWindow referenced in function "public: static __int64 __cdecl itk::Win32OutputWindow::WndProc(struct HWND__ *,unsigned int,unsigned __int64,__int64)" (?WndProc@Win32OutputWindow@itk@@SA_JPEAUHWND__@@I_K_J@Z)
ITKCommon-4.4.lib(itkWin32OutputWindow.obj) : error LNK2019: unresolved external symbol __imp_MessageBoxA referenced in function "protected: void __cdecl itk::Win32OutputWindow::PromptText(char const *)" (?PromptText@Win32OutputWindow@itk@@IEAAXPEBD@Z)
ITKCommon-4.4.lib(itkWin32OutputWindow.obj) : error LNK2019: unresolved external symbol __imp_LoadCursorA referenced in function "protected: static int __cdecl itk::Win32OutputWindow::Initialize(void)" (?Initialize@Win32OutputWindow@itk@@KAHXZ)
ITKCommon-4.4.lib(itkWin32OutputWindow.obj) : error LNK2019: unresolved external symbol __imp_LoadIconA referenced in function "protected: static int __cdecl itk::Win32OutputWindow::Initialize(void)" (?Initialize@Win32OutputWindow@itk@@KAHXZ)
itksys-4.4.lib(SystemTools.obj) : error LNK2019: unresolved external symbol __imp_RegCloseKey referenced in function "public: static bool __cdecl itksys::SystemTools::DeleteRegistryValue(char const *,enum itksys::SystemTools::KeyWOW64)" (?DeleteRegistryValue@SystemTools@itksys@@SA_NPEBDW4KeyWOW64@12@@Z)
itksys-4.4.lib(SystemTools.obj) : error LNK2019: unresolved external symbol __imp_RegCreateKeyExA referenced in function "public: static bool __cdecl itksys::SystemTools::WriteRegistryValue(char const *,char const *,enum itksys::SystemTools::KeyWOW64)" (?WriteRegistryValue@SystemTools@itksys@@SA_NPEBD0W4KeyWOW64@12@@Z)
itksys-4.4.lib(SystemTools.obj) : error LNK2019: unresolved external symbol __imp_RegDeleteValueA referenced in function "public: static bool __cdecl itksys::SystemTools::DeleteRegistryValue(char const *,enum itksys::SystemTools::KeyWOW64)" (?DeleteRegistryValue@SystemTools@itksys@@SA_NPEBDW4KeyWOW64@12@@Z)
itksys-4.4.lib(SystemTools.obj) : error LNK2019: unresolved external symbol __imp_RegOpenKeyExA referenced in function "public: static bool __cdecl itksys::SystemTools::DeleteRegistryValue(char const *,enum itksys::SystemTools::KeyWOW64)" (?DeleteRegistryValue@SystemTools@itksys@@SA_NPEBDW4KeyWOW64@12@@Z)
itksys-4.4.lib(SystemTools.obj) : error LNK2019: unresolved external symbol __imp_RegQueryValueExA referenced in function "public: static class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __cdecl itksys::SystemTools::GetOperatingSystemNameAndVersion(void)" (?GetOperatingSystemNameAndVersion@SystemTools@itksys@@SA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@XZ)
itksys-4.4.lib(SystemTools.obj) : error LNK2019: unresolved external symbol __imp_RegSetValueExA referenced in function "public: static bool __cdecl itksys::SystemTools::WriteRegistryValue(char const *,char const *,enum itksys::SystemTools::KeyWOW64)" (?WriteRegistryValue@SystemTools@itksys@@SA_NPEBD0W4KeyWOW64@12@@Z)
release\ImageRegistration.exe : fatal error LNK1120: 18 unresolved externals
几乎所有错误都基于itksys和itkCommon。两者都在.Pro文件中的库中