gpt4 book ai didi

qt - 静态编译 Qt 4.6.2

转载 作者:行者123 更新时间:2023-12-04 00:21:18 27 4
gpt4 key购买 nike

这是我所做的,但会导致错误:

1:在 win32-msvc2008\qmake.conf 我设置 QMAKE_CFLAGS_RELEASE = -O1 -Og -GL -MD
2:从 MSVC2008 CMD 我运行 vcvarsall.bat x86vcvars32.bat "C:\Program Files\Microsoft Visual Studio 9.0\VC\bin
3:从 Qt 4.6.2 CMD 我运行以下

C:\Qt\4.6.2>configure -release -nomake examples -nomake demos -no-exceptions -n o-stl -no-rtti -no-qt3support -no-scripttools -no-openssl -no-opengl -no-webkit -no-phonon -no-style-motif -no-style-cde -no-style-cleanlooks -no-style-plastique -no-sql-sqlite -platform win32-msvc2008 -static -qt-libjpeg -qt-zlib -qt-libpng



然后 nmake
但是,我每次都遇到以下错误:

    link /LIBPATH:"c:\Qt\4.6.2\lib"

/LIBPATH:"c:\Qt\4.6.2\lib" /NOLOGO /INCR EMENTAL:NO /MANIFEST /MANIFESTFILE:"tmp\obj\release_static\assistant_adp.interme diate.manifest" /SUBSYSTEM:WINDOWS "/MANIFESTDEPENDENCY:type='win32' name='Micro soft.Windows.Common-Controls' version='6.0.0.0' publicKeyToken='6595b64144ccf1df ' language='' processorArchitecture=''" /OUT:......\bin\assistant_adp.exe @C :\DOCUME~1\Geeko\LOCALS~1\Temp\nm3F8.tmp fontpanel.obj : MSIL .netmodule or module compiled with /GL found; restarting li nk with /LTCG; add /LTCG to the link command line to improve linker performance main.obj : error LNK2001: unresolved external symbol "class QObject * __cdecl qt _plugin_instance_qjpeg(void)" (?qt_plugin_instance_qjpeg@@YAPAVQObject@@XZ) ......\bin\assistant_adp.exe : fatal error LNK1120: 1 unresolved externals

NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio 9.0\VC\BIN \link.EXE"' : return code '0x460' Stop.

NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio 9.0\VC\BIN \nmake.exe"' : return code '0x2' Stop.

NMAKE : fatal error U1077: 'cd' : return code '0x2' Stop.

NMAKE : fatal error U1077: 'cd' : return code '0x2' Stop.

NMAKE : fatal error U1077: 'cd' : return code '0x2' Stop.



真的谢谢你。

最佳答案

我试图用 MS VS 2008 来做这件事,它奏效了。

C:\Qt\4.6.2>configure -release -static -opensource -no-fast -no-exceptions -no-accessibility -no-rtti -no-stl -no-opengl -no-openvg -no-incredibuild-xge -no-style-plastique -no-style-cleanlooks -no-style-motif -no-style-cde -no-style-windowsce -no-style-windowsmobile -no-style-s60 -no-gif -no-libpng -no-libtiff -no-libjpeg -no-libmng -no-qt3support -no-mmx -no-3dnow -no-sse -no-sse2 -no-iwmmxt -no-openssl -no-dbus -platform win32-msvc2008 -arch windows -no-phonon -no-phonon-backend -no-multimedia -no-audio-backend -no-script -no-scripttools -webkit -no-declarative
但是,在构建静态链接到 QWebKit 的项目时出现这些错误:
1>Creating library C:\Users\Geeko\Desktop\Qt\TestQ\Release\TestQ.lib and object C:\Users\Geeko\Desktop\Qt\TestQ\Release\TestQ.exp

1>QtWebKit.lib(PluginPackageWin.obj) : error LNK2019: unresolved external symbol _VerQueryValueW@16 referenced in function "class WebCore::String __cdecl WebCore::getVersionInfo(void * const,class WebCore::String const &)" (?getVersionInfo@WebCore@@YA?AVString@1@QAXABV21@@Z)

1>QtWebKit.lib(PluginPackageWin.obj) : error LNK2019: unresolved external symbol _GetFileVersionInfoW@16 referenced in function "private: bool __thiscall WebCore::PluginPackage::fetchInfo(void)" (?fetchInfo@PluginPackage@WebCore@@AAE_NXZ)

1>QtWebKit.lib(PluginPackageWin.obj) : error LNK2019: unresolved external symbol _GetFileVersionInfoSizeW@8 referenced in function "private: bool __thiscall WebCore::PluginPackage::fetchInfo(void)" (?fetchInfo@PluginPackage@WebCore@@AAE_NXZ)

1>QtWebKit.lib(PluginDatabaseWin.obj) : error LNK2019: unresolved external symbol __imp__PathRemoveFileSpecW@4 referenced in function "class WebCore::String __cdecl WebCore::safariPluginsDirectory(void)" (?safariPluginsDirectory@WebCore@@YA?AVString@1@XZ)

1>QtWebKit.lib(PluginDatabaseWin.obj) : error LNK2019: unresolved external symbol __imp__SHGetValueW@24 referenced in function "void __cdecl WebCore::addWindowsMediaPlayerPluginDirectory(class WTF::Vector<class WebCore::String,0> &)" (?addWindowsMediaPlayerPluginDirectory@WebCore@@YAXAAV?$Vector@VString@WebCore@@$0A@@WTF@@@Z)

1>QtWebKit.lib(PluginDatabaseWin.obj) : error LNK2019: unresolved external symbol __imp__PathCombineW@12 referenced in function "void __cdecl WebCore::addMacromediaPluginDirectories(class WTF::Vector<class WebCore::String,0> &)" (?addMacromediaPluginDirectories@WebCore@@YAXAAV?$Vector@VString@WebCore@@$0A@@WTF@@@Z)

1>C:\Users\Geeko\Desktop\Qt\TestQ\Release\TestQ.exe : fatal error LNK1120: 6 unresolved externals
我需要检查 Qt 项目选项中的内容吗?
我检查了 QtCore、QtGui、Network 和 WebKit。

关于qt - 静态编译 Qt 4.6.2,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2461799/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com