Linking with QtWebKit
-
Hello. I've tried to link with qtwebkit, but it's failed.
Firstly, error were:
@Creating library webkit-test.lib and object webkit-test.exp
main.cpp.obj : error LNK2001: unresolved external symbol "public: static struct
QMetaObject const QWebPage::staticMetaObject" (?staticMetaObject@QWebPage@@2UQMetaObject@@B)
main.cpp.obj : error LNK2019: unresolved external symbol "public: __thiscall QWebPage::QWebPage(class QObject *)" (??0QWebPage@@QAE@PAVQObject@@@Z) referenced in function "public: void __thiscall QWebPage::default constructor closure'(void)" (??_FQWebPage@@QAEXXZ) main.cpp.obj : error LNK2001: unresolved external symbol "public: static struct QMetaObject const QWebView::staticMetaObject" (?staticMetaObject@QWebView@@2UQMetaObject@@B) main.cpp.obj : error LNK2019: unresolved external symbol "public: __thiscall QWebView::QWebView(class QWidget *)" (??0QWebView@@QAE@PAVQWidget@@@Z) referenced in function "public: void __thiscall QWebView::
default constructor closure'(void)" (??_FQWebView@@QAEXXZ)
webkit-test.exe : fatal error LNK1120: 4 unresolved externals@but when I added "TARGET_LINK_LIBRARIES( webkit-test G:/git/qt5/qtwebkit/WebKitBuild/Release/lib/QtWebKit5.lib )" to my CMakeLists.txt, error number decreased and now it's:
@ Creating library webkit-test.lib and object webkit-test.exp
main.cpp.obj : error LNK2001: unresolved external symbol "public: static struct
QMetaObject const QWebPage::staticMetaObject" (?staticMetaObject@QWebPage@@2UQMetaObject@@B)
main.cpp.obj : error LNK2001: unresolved external symbol "public: static struct
QMetaObject const QWebView::staticMetaObject" (?staticMetaObject@QWebView@@2UQMetaObject@@B)
webkit-test.exe : fatal error LNK1120: 2 unresolved externals@G:\webkit-test\dumpbin.exe /EXPORTS QtWebKit5.lib
outputs:
@Microsoft (R) COFF/PE Dumper Version 10.00.40219.01
Copyright (C) Microsoft Corporation. All rights reserved.Dump of file G:\git\qt5\qtwebkit\WebKitBuild\Release\lib\QtWebKit5.lib
File Type: LIBRARY
Exports
...
?staticMetaObject@QWebPage@@2UQMetaObject@@B (public: static struct QMetaObject const QWebPage::staticMetaObject)
...
?staticMetaObject@QWebView@@2UQMetaObject@@B (public: static struct QMetaObject const QWebView::staticMetaObject)
...@Why I have this error?
Project: http://rghost.ru/39274557
Qt5 from git, cmake 2.8.8, msvs 2010 -
I also had the same problem , could you explain clearly?
how to add and add waht