zoukankan      html  css  js  c++  java
  • Win7 64位 VS2012 安装 Qt5

    注意,本教程的操作系统为 Win7 64位,VS2012 英文版。

    由于机器是64位,编译Qt的过程中,有可能出现如下问题。

     
     
    1. fatal error LNK1112: module machine type 'x64' conflicts with target machine type 'X86'  

    按照下面的教程,可以解决上面的编译错误。

    1. 从 Qt 官网下载 qt-windows-opensource-5.1.0-msvc2012-x86_64-offline.exe,安装。

    2. 下载 qt-vs-addin-1.2.2-opensource.exe,安装。

    3. 添加环境变量 QTDIR,在我的机器上是下面的路径。

    [plain] view plaincopy
     
     
    1. D:QtQt5.1.05.1.0msvc2012_64  

    4. 添加Qt Version。

    点击VS2012的菜单QT5 -> Qt Options,在弹出的窗口中,点击Add,在Path的输入框中,输入下面的路径,注意对应修改为你机器上的路径。

     
    1. D:QtQt5.1.05.1.0msvc2012_64  

    5. 在VS2012中新建一个Qt Project,HelloQt

    6. 在Solution Explorer右键点击项目HelloQt -> Properties,点击弹出窗口右上角的Configuration Manager,修改Platform为x64。

    6. 在Solution Explorer右键点击项目HelloQt -> Properties -> Configuration Properties -> Linker -> Advanced,点击 Target Machine 修改为X64。

    7. 在Solution Explorer右键点击项目HelloQt -> Qt Project Settings,在弹出的窗口中,点击Version的下拉框,选择msvc2012_64。

    现在,Ctrl + F5 应该可以正常运行啦。如果还不行,在Solution Explorer右键点击项目HelloQt -> Rebuild。

  • 相关阅读:
    C++ 编码转换
    获取文件扩展名
    字符串分割(C++)(转载)
    Visual Leak Detector简明使用教程
    Win32 文件拖拽
    IMAP协议命令(详细)
    CreateDirectory 创建文件夹 CC++
    编程习惯总结
    GitHub上整理的一些工具,求补充
    jquery生成qrcode二维码
  • 原文地址:https://www.cnblogs.com/elitiwin/p/3581408.html
Copyright © 2011-2022 走看看