我尝试使用7z.dll在Qt5(Windows 7)上编译简单的应用程序。我使用来自7zip Client7z示例的代码示例,但我得到了下一个错误:
mainwindow.obj : error LNK2019: unresolved external symbol __imp__SysAllocString@4 referenced in function "long __cdecl StringToBstr(wchar_t const *,wchar_t * *)" (?StringToBstr@@YAJPB_WPAPA_W@Z)
mainwindow.obj : error LNK2019: unresolved external symbol "class CStringBase<wchar_t> __cdecl ConvertPropVariantToString(struct tagPROPVARIANT const &)" (?ConvertPropVariantToString@@YA?AV?$CStringBase@_W@@ABUtagPROPVARIANT@@@Z) referenced in function "private: void __thiscall MainWindow::getArchiveContent(class QString const &)" (?getArchiveContent@MainWindow@@AAEXABVQString@@@Z)
mainwindow.obj : error LNK2019: unresolved external symbol "public: long __thiscall NWindows::NCOM::CPropVariant::Clear(void)" (?Clear@CPropVariant@NCOM@NWindows@@QAEJXZ) referenced in function "public: __thiscall NWindows::NCOM::CPropVariant::~CPropVariant(void)" (??1CPropVariant@NCOM@NWindows@@QAE@XZ)
mainwindow.obj : error LNK2019: unresolved external symbol "public: bool __thiscall NWindows::NFile::NIO::CInFile::Open(wchar_t const *)" (?Open@CInFile@NIO@NFile@NWindows@@QAE_NPB_W@Z) referenced in function "public: bool __thiscall CInFileStream::Open(wchar_t const *)" (?Open@CInFileStream@@QAE_NPB_W@Z)
mainwindow.obj : error LNK2001: unresolved external symbol "public: virtual long __stdcall CInFileStream::Read(void *,unsigned int,unsigned int *)" (?Read@CInFileStream@@UAGJPAXIPAI@Z)
mainwindow.obj : error LNK2001: unresolved external symbol "public: virtual long __stdcall CInFileStream::Seek(__int64,unsigned int,unsigned __int64 *)" (?Seek@CInFileStream@@UAGJ_JIPA_K@Z)
mainwindow.obj : error LNK2001: unresolved external symbol "public: virtual long __stdcall CInFileStream::GetSize(unsigned __int64 *)" (?GetSize@CInFileStream@@UAGJPA_K@Z)
mainwindow.obj : error LNK2019: unresolved external symbol "public: virtual __thiscall CInFileStream::~CInFileStream(void)" (??1CInFileStream@@UAE@XZ) referenced in function "public: virtual void * __thiscall CInFileStream::`scalar deleting destructor'(unsigned int)" (??_GCInFileStream@@UAEPAXI@Z)
debug\archive.exe : fatal error LNK1120: 8 unresolved externals
对于纠正这些错误的任何帮助,我将不胜感激。