• 6429阅读
  • 2回复

在windows上运行mingw32-make编译QtWebKitd4.dll时出错,怎么解决 [复制链接]

上一主题 下一主题
离线水色心情
 
只看楼主 倒序阅读 楼主  发表于: 2010-05-19
如下错误:

Creating library file: c:\Qt\2009.03\qt\lib\libQtWebKitd4.a
./tmp\obj\debug_shared\QNetworkReplyHandler.o:QNetworkReplyHandler.cpp:

(.text+0x14c): undefined reference to `vtable for WebCore::FormDataIODevice'
./tmp\obj\debug_shared\QNetworkReplyHandler.o:QNetworkReplyHandler.cpp:

(.text+0x2a4): undefined reference to `vtable for WebCore::FormDataIODevice'
./tmp\obj\debug_shared\QNetworkReplyHandler.o:QNetworkReplyHandler.cpp:

(.text+0x3e8): undefined reference to `vtable for WebCore::FormDataIODevice'
./tmp\obj\debug_shared\QNetworkReplyHandler.o:QNetworkReplyHandler.cpp:

(.text+0x50c): undefined reference to `vtable for WebCore::FormDataIODevice'
./tmp\obj\debug_shared\QNetworkReplyHandler.o:QNetworkReplyHandler.cpp:

(.text+0x630): undefined reference to `vtable for WebCore::FormDataIODevice'
./tmp\obj\debug_shared\QNetworkReplyHandler.o:QNetworkReplyHandler.cpp:

(.text+0xd8e): undefined reference to `vtable for

WebCore::QNetworkReplyHandler'
./tmp\obj\debug_shared\QNetworkReplyHandler.o:QNetworkReplyHandler.cpp:

(.text+0x10a0): undefined reference to `vtable for

WebCore::QNetworkReplyHandler'
./tmp\obj\debug_shared\QNetworkReplyHandler.o:QNetworkReplyHandler.cpp:

(.text+0x1396): undefined reference to `vtable for

WebCore::QNetworkReplyHandler'
./tmp\obj\debug_shared\QNetworkReplyHandler.o:QNetworkReplyHandler.cpp:

(.text+0x1466): undefined reference to `vtable for

WebCore::QNetworkReplyHandler'
./tmp\obj\debug_shared\QNetworkReplyHandler.o:QNetworkReplyHandler.cpp:

(.text+0x1536): undefined reference to `vtable for

WebCore::QNetworkReplyHandler'
collect2: ld returned 1 exit status
mingw32-make[1]: Leaving directory

`C:/Qt/2009.03/qt/src/3rdparty/webkit/WebCore'
mingw32-make: Leaving directory

`C:/Qt/2009.03/qt/src/3rdparty/webkit/WebCore'
mingw32-make[1]: *** [..\..\..\..\lib\QtWebKitd4.dll] Error 1
mingw32-make: *** [debug-all] Error 2
离线ahhphei
只看该作者 1楼 发表于: 2010-07-16
同问,帮顶
离线rubypdf
只看该作者 2楼 发表于: 2010-07-20
我在Windows 下使用mingw编译静态版本的QT 4.6.3是没有碰到你说的这个问题,搜索了些,得到下面的内容
When building C++, the linker says my constructors, destructors or virtual tables are undefined, but I defined them

The ISO C++ Standard specifies that all virtual methods of a class that are not pure-virtual must be defined, but does not require any diagnostic for violations of this rule [class.virtual]/8. Based on this assumption, GCC will only emit the implicitly defined constructors, the assignment operator, the destructor and the virtual table of a class in the translation unit that defines its first such non-inline method.

Therefore, if you fail to define this particular method, the linker may complain about the lack of definitions for apparently unrelated symbols. Unfortunately, in order to improve this error message, it might be necessary to change the linker, and this can't always be done.

The solution is to ensure that all virtual methods that are not pure are defined. Note that a destructor must be defined even if it is declared pure-virtual [class.dtor]/7.

http://gcc.gnu.org/faq.html#vtables
快速回复
限100 字节
 
上一个 下一个