【问题标题】:Compiling QT 5.3.2 under windows 7 and msvcwindows 7和msvc下编译QT 5.3.2
【发布时间】:2014-12-17 06:23:40
【问题描述】:

我使用的是 msvc 2013 (ultimate-64bit)、windows 7 64bit。 我用 msvc 2013 (64 bit) 编译了 icu4c 54.1。

现在我尝试编译 qt 5.3.2-everywhere-opensource-src(我在那里添加了补丁(我替换了QWebFrame.cpp))

我使用了 Visual Studio 的 CMD 开发工具。

--- 我执行了这些命令:

  1. cd D:\qt
  2. d:
  3. configure -prefix D:\Qt\Qt_making -platform win32-msvc2013 -opensource -c++11 -make tools -make libs -qt-sql-sqlite -no-openssl -icu -I C:\icu-53.1-vs2013\include -L C:\icu-53.1-vs2013\lib64 // 一切正常 - 毕竟,包括已加载/已加载的新 icu 库
  4. nmake

在 4 个命令之后,进程中断。并显示错误:

with: 36 unresolved externals 这些“未解决的外部”可能与库有关。

我制作了这些错误的屏幕(如下):

那怎么了?

我必须编译 QT(特别是 QWebKit - 因为补丁都是 64 位的。)

【问题讨论】:

  • 你好。你解决了这个问题吗?

标签: c++ windows visual-studio qt


【解决方案1】:

上次我为 Windows 编译 Qt(为了获得 OpenGL 的桌面版本),这就是我需要做的。请注意,这是针对 VS2010 和 Qt 5.0.0(在 Windows 7 上)。

set CL=/MP

if not compiling qtwebkit:
    Need to rename/delete the qtwebkit* directories (there's a -no-webkit option but it doesn't work in 5.0.0)
else:
    Need ICU, GNU bison, and GNU gperf (either install the prebuilt binaries or build yourself)

if using ICU (required for qtwebkit):
    set LIB=%LIB%;C:\icu\lib
    set INCLUDE=%INCLUDE%;C:\icu\include
    set PATH=C:\icu\bin;%PATH%

set PATH=%PATH%;C:\Program Files (x86)\gperf\bin;C:\bison\bin
cd <path>\qt-everywhere-opensource-src-<version>
configure -prefix C:\Qt\Qt5.0.0-opengl-desktop -opensource -debug-and-release -platform win32-msvc2010 -opengl desktop -no-cetest -nomake tests -nomake examples -confirm-license -ltcg -qt-zlib -qt-pcre -qt-libpng -qt-libjpeg -mp
nmake
nmake install

if used ICU:
    copy all the DLLs from C:\icu\bin to C:\Qt\Qt5.0.0-opengl-desktop\bin

【讨论】:

  • 好吧,我已经用你的方法编译了 QT。都编译好了。但是我没有'QtWebKit'nmake module-qtwebkitnmake install,但仍然没有qtwebkit。你的方法编译了这些link to img
  • @Thomas:嗯,很抱歉。我很确定当时编译的 webkit,但正如我提到的那样,那是前一阵子的事了。 (我只是将其作为答案,因为评论太长了。)也许如果您尝试将-webkit 标志显式传递给configure?另外,你是怎么得到那个截图的?实际 bin 安装目录中的 DLL 是什么?
  • 这个屏幕截图是我在 qt 项目设置中使用 Visual Studio 2013 制作的。 configure -prefix d:\Qt\Qt5.0.0-opengl-desktop -opensource -debug-and-release -platform win32-msvc2013 -webkit -no-cetest -nomake tests -nomake examples -confirm-license -ltcg -qt-zlib -qt-pcre -qt-libpng -qt-libjpeg -mp -webkit '未知选项'
  • @Thomas:糟糕,回顾一下我查阅过的文档,-webkit 似乎只适用于 4.8。恐怕我不知道如何编译 webkit 超出我已经在我的答案中提出的内容,你说这不起作用:/ 你确定 DLL 不在前缀路径的 bin 目录中吗?
  • 是 - MSVC 也没有检测到 webkit
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 2018-06-22
  • 1970-01-01
  • 2011-01-26
  • 1970-01-01
  • 1970-01-01
  • 2022-09-25
  • 1970-01-01
相关资源
最近更新 更多