QT 5.7 MSVC 2015静态构建不工作
QT 5.7 MSVC 2015 Static Builds Not Working
我在Windows上使用我的QT 5.7 MSVC 2015静态构建(32位和64位)有麻烦。以下是我运行的命令和得到的输出(也用32位进行了测试):
C:UsersJosh>set PATH=C:QtstaticQt 5.7.0 MSVC2015_Static_x64bin;%PATH%
C:UsersJosh>cd "UsersJoshMozy SyncReplicatorNewReplicatorNew"
C:UsersJoshMozy SyncReplicatorNewReplicatorNew>qmake ReplicatorNew.pro
Could not find qmake configuration file win32-msvc2015.
Error processing project file: ReplicatorNew.pro
以下是我配置QT静态构建的步骤:
- 下载QT 5.7源代码并解压缩到自己的目录。
- 安装QT与QT Creator和msvc2015 32和64位。
- 安装Visual Studio 2015社区与所有的Visual c++选项检查。
- 安装草莓Perl 32位并添加到路径。
- 安装Python 2.7.12并添加到path.
- 安装Ruby并添加到路径。
- 安装了Windows 10 SDK并勾选了install中的所有选项。
- 安装到自己的目录
- 下载openssl源代码并按这里构建。
将qtbasemkspecscommonmsvc-desktop.conf编辑为以下内容:
QMAKE_CFLAGS_RELEASE = -O2 -MT QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO += -O2 -MT -Zi QMAKE_CFLAGS_DEBUG = -Zi -MTd
run this for 32 bit:
cd "Program Files (x86)Microsoft Visual Studio 14.0vc" vcvarsall.bat x86
64位:
cd "Program Files (x86)Microsoft Visual Studio 14.0vc" vcvarsall.bat amd64
这些:
set QMAKESPEC=win32-msvc2015 set QTDIR=C:QtStaticqt-everywhere-enterprise-src-5.7.0qtbase set PATH=C:QtStaticqt-everywhere-enterprise-src-5.7.0qtbasebin;%PATH% cd C:QtStaticqt-everywhere-enterprise-src-5.7.0
对于32位:
configure -debug-and-release -confirm-license -platform win32-msvc2015 -opengl desktop -static -target xp -nomake examples -no-compile-examples -nomake tests -prefix C:QtstaticMSVC2015_Static_x86 -openssl -L C:OpenSSL-win32lib -l libeay32 -l ssleay32 -I C:OpenSSL-win32include -qt-libpng -qt-libjpeg -qt-zlib
对于64位:
configure -debug-and-release -confirm-license -platform win32-msvc2015 -opengl desktop -static -nomake examples -no-compile-examples -nomake tests -prefix C:QtstaticMSVC2015_Static_x64 -openssl -L C:OpenSSL-win64lib -l libeay32 -l ssleay32 -I C:OpenSSL-win64include -qt-libpng -qt-libjpeg -qt-zlib
然后运行这些:
C:Qtstaticjom_1_1_1jom.exe -j 4 C:Qtstaticjom_1_1_1jom.exe -j 4 install
还明确验证了win32-msvc2015在静态构建目录的mkspecs目录中。我将qt静态文件重命名为第一个代码片段中的名称。我在谷歌上找不到太多,所以我在这里发帖,希望能有所帮助。谢谢。我希望它很简单,就像我留了一个目录放在路径环境变量中。
原来的问题是我重命名QT静态构建目录后的构建,这打破了它。快速修复:将其重命名为原始的configure -prefix名称。谢谢库巴地毯!
相关文章:
- 从不同目录执行时"symbol lookup error:",否则从构建目录执行时按预期工作
- Visual Studio 2019:使用 vcvars64 从命令行构建C++.bat不再工作
- 所有Visual Studio安装程序崩溃,可视化构建工具也无法正常工作
- 构建对象数组是如何工作的?我被这个例子困住了
- 我的代码在构建时没有任何错误,但无法正常工作
- 没有这样的文件或目录,而本地构建工作正常
- 想法C++自动统一构建系统,它能工作吗
- 如何为IOCP构建工作线程逻辑
- Qt 4.8.4 从 Ubuntu 12.04 上的源代码构建,无法正常工作
- 错误:不是.exe已停止工作 - 尝试构建 LLVM 时
- Ctest/CDash工作流:部署夜间构建
- 用Xcode 3.2.6构建10.7 Lion应用程序-它们能工作吗
- 为什么需要构建boost来使下载的项目工作
- 在构建时工作,但在调试器中有问题
- QT 5.7 MSVC 2015静态构建不工作
- Android源代码构建#ifdefs如何在编译中工作
- Libpcap的例子不工作,但项目在eclipse中构建
- 使用ZeroMQ构建点对点工作负载调度器是否有帮助?
- 在Eclipse中设置c++构建工作目录
- LNK1104时使用完全重建,但增量构建工作visual studio 2012 express