• 8640阅读
  • 4回复

[提问]Qt 4.8.0 用VS2010静态编译的问题(带webkit和openssl) [复制链接]

上一主题 下一主题
离线isml
 

只看楼主 倒序阅读 楼主  发表于: 2012-03-30
用VS 2010静态编译Qt 4.8.0,带webkit和openssl,编译选项为:

configure -platform win32-msvc2010 -debug-and-release -opensource -static -fast -no-qt3support -qt-style-windowsxp -qt-style-windowsvista -webkit -openssl -I D:\Qt\openssl-1.0.1\include -L D:\Qt\openssl-1.0.1\lib -nomake examples -nomake docs -nomake demos

中间编译出错,手动修改过两次地方,最终出现6个link错误,不知道咋解:
webcore.lib(XMLDocumentParserQt.obj) : error LNK2019: 无法解析的外部符号 "__decl
spec(dllimport) public: class QXmlStreamAttribute const & __thiscall QVector<cla
ss QXmlStreamAttribute>::operator[](int)const " (__imp_??A?$QVector@VQXmlStreamA
ttribute@@@@QBEABVQXmlStreamAttribute@@H@Z),该符号在函数 "void __cdecl WebCore:
:handleElementAttributes(class WebCore::Element *,class QXmlStreamAttributes con
st &,int &,enum WebCore::FragmentScriptingPermission)" (?handleElementAttributes
@WebCore@@YAXPAVElement@1@ABVQXmlStreamAttributes@@AAHW4FragmentScriptingPermiss
ion@1@@Z) 中被引用
webcore.lib(ImageBufferQt.obj) : error LNK2019: 无法解析的外部符号 "__declspec(d
llimport) public: class QPixmap __thiscall QPixmap::scaled(int,int,enum Qt::Aspe
ctRatioMode,enum Qt::TransformationMode)const " (__imp_?scaled@QPixmap@@QBE?AV1@
HHW4AspectRatioMode@Qt@@W4TransformationMode@3@@Z),该符号在函数 "private: void
__thiscall WebCore::ImageBuffer::clip(class WebCore::GraphicsContext *,class Web
Core::FloatRect const &)const " (?clip@ImageBuffer@WebCore@@ABEXPAVGraphicsConte
xt@2@ABVFloatRect@2@@Z) 中被引用
webcore.lib(DragImageQt.obj) : error LNK2001: 无法解析的外部符号 "__declspec(dll
import) public: class QPixmap __thiscall QPixmap::scaled(int,int,enum Qt::Aspect
RatioMode,enum Qt::TransformationMode)const " (__imp_?scaled@QPixmap@@QBE?AV1@HH
W4AspectRatioMode@Qt@@W4TransformationMode@3@@Z)
webcore.lib(ContextShadowQt.obj) : error LNK2019: 无法解析的外部符号 "__declspec
(dllimport) public: void __thiscall QPainter::drawImage(class QPointF const &,cl
ass QImage const &,class QRectF const &,class QFlags<enum Qt::ImageConversionFla
g>)" (__imp_?drawImage@QPainter@@QAEXABVQPointF@@ABVQImage@@ABVQRectF@@V?$QFlags
@W4ImageConversionFlag@Qt@@@@@Z),该符号在函数 "public: void __thiscall WebCore:
:ContextShadow::endShadowLayer(class WebCore::GraphicsContext *)" (?endShadowLay
er@ContextShadow@WebCore@@QAEXPAVGraphicsContext@2@@Z) 中被引用
webcore.lib(UUID.obj) : error LNK2019: 无法解析的外部符号 "__declspec(dllimport)
public: class QString __thiscall QUuid::toString(void)const " (__imp_?toString@
QUuid@@QBE?AVQString@@XZ),该符号在函数 "class WTF::String __cdecl WebCore::crea
teCanonicalUUIDString(void)" (?createCanonicalUUIDString@WebCore@@YA?AVString@WT
F@@XZ) 中被引用
webcore.lib(UUID.obj) : error LNK2019: 无法解析的外部符号 "__declspec(dllimport)
public: static struct QUuid __cdecl QUuid::createUuid(void)" (__imp_?createUuid
@QUuid@@SA?AU1@XZ),该符号在函数 "class WTF::String __cdecl WebCore::createCanon
icalUUIDString(void)" (?createCanonicalUUIDString@WebCore@@YA?AVString@WTF@@XZ)
中被引用
webcore.lib(PlatformScreenQt.obj) : error LNK2019: 无法解析的外部符号 "__declspe
c(dllimport) public: int __thiscall QPaintDevice::colorCount(void)const " (__imp
_?colorCount@QPaintDevice@@QBEHXZ),该符号在函数 "bool __cdecl WebCore::screenIs
Monochrome(class WebCore::Widget *)" (?screenIsMonochrome@WebCore@@YA_NPAVWidget
@1@@Z) 中被引用
release\tst_qwebframe.exe : fatal error LNK1120: 6 个无法解析的外部命令
NMAKE : fatal error U1077: “"C:\Program Files (x86)\Microsoft Visual Studio 10.
0\VC\BIN\link.EXE"”: 返回代码“0x460”
离线roywillow

只看该作者 1楼 发表于: 2012-03-30
好像webkit静态编译一直是问题多多,并且我还没见到啥解决方法
专业维修核潜艇,回收二手航母、二手航天飞机,大修核反应堆,拆洗导弹发动机更换机油,无人侦察机手动挡改自动,航天飞机保养换三滤,飞碟外太空年检 ,各型号导弹加装迎宾踏板,高空作业擦洗卫星表面除尘、打蜡及抛光,东风全系列巡航导弹。并提供原子对撞机。量大从优,有正规发票。
离线lipper
只看该作者 2楼 发表于: 2012-03-30
离线dbzhang800

只看该作者 3楼 发表于: 2012-03-31
在Manual中,你应该可以找到这样一句说:

* WebKit is only supported as a dynamically built library. Static linkage is not supported.

http://doc.qt.nokia.com/4.7/platform-notes.html
http://doc-snapshot.qt-project.org/5.0/platform-notes.html

离线roywillow

只看该作者 4楼 发表于: 2012-03-31
回 3楼(dbzhang800) 的帖子
顺便在此问一下
有没有办法单独以某个配置编译Qt的某个模块?
比如说Qt的core、gui、network等是静态编译,然后既然webkit不能静态,那就让它静态连接这些库,动态编译自己可以吗?
再比如之前我没有编译multimedia之类的模块,现在发现要用到了,能单独编译吗?
专业维修核潜艇,回收二手航母、二手航天飞机,大修核反应堆,拆洗导弹发动机更换机油,无人侦察机手动挡改自动,航天飞机保养换三滤,飞碟外太空年检 ,各型号导弹加装迎宾踏板,高空作业擦洗卫星表面除尘、打蜡及抛光,东风全系列巡航导弹。并提供原子对撞机。量大从优,有正规发票。
快速回复
限100 字节
 
上一个 下一个