Russian Qt Forum

Qt => Установка, сборка, отладка, тестирование => Тема начата: k06a от Апрель 27, 2011, 02:44



Название: Ошибки линковщика Qt 4.7.4 vs2008 static release
Отправлено: k06a от Апрель 27, 2011, 02:44
Работал в QtCreator, всё было хорошо.
Перенёс проект в vs2008 через интегратор (версия вроде крайняя).
Собрал куте 4.7.4 под студию, статику, релиз.

Ошибки при линковке:
Цитировать
error LNK2019: unresolved external symbol "__declspec(dllimport) public: static class QString __cdecl QObject::tr(char const *,char const *)" (__imp_?tr@QObject@@SA?AVQString@@PBD0@Z)
error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall QListWidgetItem::setToolTip(class QString const &)" (__imp_?setToolTip@QListWidgetItem@@QAEXABVQString@@@Z)
error LNK2019: unresolved external symbol "__declspec(dllimport) public: class QIcon __thiscall QListWidgetItem::icon(void)const " (__imp_?icon@QListWidgetItem@@QBE?AVQIcon@@XZ)
error LNK2019: unresolved external symbol "__declspec(dllimport) public: bool __thiscall QString::operator!=(char const *)const " (__imp_??9QString@@QBE_NPBD@Z)
error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall QListWidgetItem::setText(class QString const &)" (__imp_?setText@QListWidgetItem@@QAEXABVQString@@@Z)
....

Линкую с qtmain.lib QtSvg.lib QtGui.lib QtCore.lib

Добавил QtXml.lib QtNetwork.lib - результат тот же ...

Может нужно DLL-ки из папки plugins добавлять?


Название: Re: Ошибки линковщика Qt 4.7.4 vs2008 static release
Отправлено: k06a от Апрель 27, 2011, 17:33
Вот более полный листинг ошибок:
Цитировать
1>mainwindow.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall QListWidgetItem::setText(class QString const &)" (__imp_?setText@QListWidgetItem@@QAEXABVQString@@@Z) referenced in function "public: void __thiscall Ui_MainWindow::retranslateUi(class QMainWindow *)" (?retranslateUi@Ui_MainWindow@@QAEXPAVQMainWindow@@@Z)
1>mainwindow.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall QListWidgetItem::setIcon(class QIcon const &)" (__imp_?setIcon@QListWidgetItem@@QAEXABVQIcon@@@Z) referenced in function "public: void __thiscall Ui_MainWindow::setupUi(class QMainWindow *)" (?setupUi@Ui_MainWindow@@QAEXPAVQMainWindow@@@Z)
1>mainwindow.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: static class QString __cdecl QFileDialog::getSaveFileName(class QWidget *,class QString const &,class QString const &,class QString const &,class QString *,class QFlags<enum QFileDialog::Option>)" (__imp_?getSaveFileName@QFileDialog@@SA?AVQString@@PAVQWidget@@ABV2@11PAV2@V?$QFlags@W4Option@QFileDialog@@@@@Z) referenced in function "private: bool __thiscall MainWindow::saveAs(void)" (?saveAs@MainWindow@@AAE_NXZ)
1>mainwindow.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: bool __thiscall QString::operator==(char const *)const " (__imp_??8QString@@QBE_NPBD@Z) referenced in function "private: bool __thiscall MainWindow::save(void)" (?save@MainWindow@@AAE_NXZ)
1>mainwindow.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: static class QString __cdecl QFileDialog::getOpenFileName(class QWidget *,class QString const &,class QString const &,class QString const &,class QString *,class QFlags<enum QFileDialog::Option>)" (__imp_?getOpenFileName@QFileDialog@@SA?AVQString@@PAVQWidget@@ABV2@11PAV2@V?$QFlags@W4Option@QFileDialog@@@@@Z) referenced in function "private: bool __thiscall MainWindow::open(void)" (?open@MainWindow@@AAE_NXZ)
1>ProcCommands.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: static class QString __cdecl QObject::tr(char const *,char const *)" (__imp_?tr@QObject@@SA?AVQString@@PBD0@Z) referenced in function "class QString __cdecl getCommandName(class QString,int)" (?getCommandName@@YA?AVQString@@V1@H@Z)
1>ProcListWidget.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall QListWidgetItem::setToolTip(class QString const &)" (__imp_?setToolTip@QListWidgetItem@@QAEXABVQString@@@Z) referenced in function "public: void __thiscall ProcListWidget::addProcModule(struct ModuleRecord const *)" (?addProcModule@ProcListWidget@@QAEXPBUModuleRecord@@@Z)
1>ProcListWidget.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: class QIcon __thiscall QListWidgetItem::icon(void)const " (__imp_?icon@QListWidgetItem@@QBE?AVQIcon@@XZ) referenced in function "protected: virtual void __thiscall ProcListWidget::mouseMoveEvent(class QMouseEvent *)" (?mouseMoveEvent@ProcListWidget@@MAEXPAVQMouseEvent@@@Z)
1>ProcTableWidget.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: bool __thiscall QString::operator!=(char const *)const " (__imp_??9QString@@QBE_NPBD@Z) referenced in function "public: void __thiscall ProcTableWidget::pasteSlot(void)" (?pasteSlot@ProcTableWidget@@QAEXXZ)
1>QtGui.lib(qaccessible_win.obj) : error LNK2019: unresolved external symbol __imp__PlaySoundW@12 referenced in function "public: static void __cdecl QAccessible::updateAccessibility(class QObject *,int,enum QAccessible::Event)" (?updateAccessibility@QAccessible@@SAXPAVQObject@@HW4Event@1@@Z)
1>QtGui.lib(qwininputcontext_win.obj) : error LNK2019: unresolved external symbol _ImmGetDefaultIMEWnd@4 referenced in function "struct HWND__ * __cdecl getDefaultIMEWnd(struct HWND__ *)" (?getDefaultIMEWnd@@YAPAUHWND__@@PAU1@@Z)
1>QtGui.lib(qwininputcontext_win.obj) : error LNK2019: unresolved external symbol _ImmGetContext@4 referenced in function "struct HIMC__ * __cdecl getContext(struct HWND__ *)" (?getContext@@YAPAUHIMC__@@PAUHWND__@@@Z)
1>QtGui.lib(qwininputcontext_win.obj) : error LNK2019: unresolved external symbol _ImmReleaseContext@8 referenced in function "void __cdecl releaseContext(struct HWND__ *,struct HIMC__ *)" (?releaseContext@@YAXPAUHWND__@@PAUHIMC__@@@Z)
1>QtGui.lib(qwininputcontext_win.obj) : error LNK2019: unresolved external symbol _ImmNotifyIME@16 referenced in function "void __cdecl notifyIME(struct HIMC__ *,unsigned long,unsigned long,unsigned long)" (?notifyIME@@YAXPAUHIMC__@@KKK@Z)
1>QtGui.lib(qwininputcontext_win.obj) : error LNK2019: unresolved external symbol _ImmGetCompositionStringW@16 referenced in function "long __cdecl getCompositionString(struct HIMC__ *,unsigned long,void *,unsigned long)" (?getCompositionString@@YAJPAUHIMC__@@KPAXK@Z)
1>QtGui.lib(qwininputcontext_win.obj) : error LNK2019: unresolved external symbol _ImmAssociateContext@8 referenced in function "void __cdecl enableIme(class QWidget *,bool)" (?enableIme@@YAXPAVQWidget@@_N@Z)
1>QtGui.lib(qwininputcontext_win.obj) : error LNK2019: unresolved external symbol _ImmSetCandidateWindow@8 referenced in function "public: virtual void __thiscall QWinInputContext::update(void)" (?update@QWinInputContext@@UAEXXZ)
1>QtGui.lib(qwininputcontext_win.obj) : error LNK2019: unresolved external symbol _ImmSetCompositionWindow@8 referenced in function "public: virtual void __thiscall QWinInputContext::update(void)" (?update@QWinInputContext@@UAEXXZ)
1>QtGui.lib(qwininputcontext_win.obj) : error LNK2019: unresolved external symbol _ImmSetCompositionFontW@8 referenced in function "public: virtual void __thiscall QWinInputContext::update(void)" (?update@QWinInputContext@@UAEXXZ)
1>QtCore.lib(qeventdispatcher_win.obj) : error LNK2019: unresolved external symbol _WSAAsyncSelect@16 referenced in function "public: void __thiscall QEventDispatcherWin32Private::doWsaAsyncSelect(int)" (?doWsaAsyncSelect@QEventDispatcherWin32Private@@QAEXH@Z)
1>release\DiGui.exe : fatal error LNK1120: 20 unresolved externals