标题:qt 5.1.1用vs2010静态编译后无法运行
作者:天下无雪
日期:2013-08-31 11:56
内容:
这是我的编译参数:
configure -confirm-license -opensource -platform win32-msvc2010 -release -prefix "D:\QT\5.1.1_vc2010_x64" -qt-sql-sqlite -qt-sql-odbc -qt-zlib -qt-libpng -qt-libjpeg -opengl desktop -qt-freetype -no-angle -nomake tests -nomake examples -mp -skip qtwebkit -no-icu -static
编译过程一切正常,但是安装vs插件建立qt工程后却无法运行
请问有哪位碰到过的告诉一下?谢谢了
#1 [adonais 08-31 17:16]
你先在命令行使用qmake编译一个例子程序试一下,最好是需要插件支持的实例,比如说sqlbrowser.exe,看你编译的静态库有没有问题.
确认库没问题之后再使用ide配置.
#2 [天下无雪 08-31 18:05]
a. 在源文件中添加:
#include
Q_IMPORT_PLUGIN (QWindowsIntegrationPlugin);
b. 在附加依赖上添加:
opengl32.lib
Qt5PlatformSupport.lib
qwindows.lib
google了半天终于解决了问题,坑爹的qt编译的静态库把qwindows当成插件了
#3 [wintershy 09-24 14:46]
为什么我按照LZ的google 结果做 还是不行,报告unsovled symbol....
#4 [skykingf 09-26 09:45]
按照lz的方法,解决了,请问opengl32.lib是哪里来的?
#5 回 4楼(skykingf) 的帖子 [lzh1104 10-29 14:29]
5.1.1貌似是这个
Qt5OpenGL.lib
Qt5OpenGLExtensio、n、s.lib