本文共 2998 字,大约阅读时间需要 9 分钟。
Window-安装qt-MVSC2013编译器
参考:
首先安装VS2013:
vs2013.5_pro_chs.iso
然后安装qt
这里我们先随便选一个版本:
因为这个版本不一定有MVSC2013版本,或者你直接下载一个有MSVC2013的:
(强烈建议直接安装这个)
但是我选择了没有MVSC2013版本的,练习一下步骤
这是别人的图,我当时只选择安装了红箭头指向的
然后找到安装路径下的:
MaintenanceTool.exe
选择设置:
清华大学的开源镜像站
红色箭头是原本安装的,红色圈出的是刚刚选择的:
然后会下载圈出的那部分进行安装
这里其实和直接安装
效果一样,但是为了学习一下才这么折腾下
正在下载和安装MSVC2013
我的pro如下:
QT += core guigreaterThan(QT_MAJOR_VERSION, 4): QT += widgetsCONFIG += c++11# The following define makes your compiler emit warnings if you use# any Qt feature that has been marked deprecated (the exact warnings# depend on your compiler). Please consult the documentation of the# deprecated API in order to know how to port your code away from it.DEFINES += QT_DEPRECATED_WARNINGS# You can also make your code fail to compile if it uses deprecated APIs.# In order to do so, uncomment the following line.# You can also select to disable deprecated APIs only up to a certain version of Qt.#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0SOURCES += \ main.cpp \ mainwindow.cpp \ saveframe.cpp \ grabframe.cpp \ phoio.cppHEADERS += \ mainwindow.h \ saveframe.h \ grabframe.h \ qphoframe.h \ phoio.hFORMS += \ mainwindow.uiRESOURCES +=INCLUDEPATH += $$PWD/../3rdParty_msvc2013/opencv-3.1.0/includeINCLUDEPATH += $$PWD/../3rdParty_msvc2013/libtiff-4.0.10/includeINCLUDEPATH += "C:/Program Files/PhotoneoPhoXiControl/API/include"DEPENDPATH += $$PWD/../3rdParty_msvc2013/opencv-3.1.0/includeDEPENDPATH += $$PWD/../3rdParty_msvc2013/libtiff-4.0.10/includeDEPENDPATH += "C:/Program Files/PhotoneoPhoXiControl/API/include"# opencvwin32:CONFIG(release, debug|release): LIBS += -L$$PWD/../3rdParty_msvc2013/opencv-3.1.0/x64/vc12/lib/ -lopencv_core310 -lopencv_imgcodecs310 -lopencv_imgproc310else:win32:CONFIG(debug, debug|release): LIBS += -L$$PWD/../3rdParty_msvc2013/opencv-3.1.0/x64/vc12/lib/ -lopencv_core310-gd -lopencv_imgcodecs310-gd -lopencv_imgproc310-gd# tiffwin32:CONFIG(release, debug|release): LIBS += -L$$PWD/../3rdParty_msvc2013/libtiff-4.0.10/lib/ -ltiffelse:win32:CONFIG(debug, debug|release): LIBS += -L$$PWD/../3rdParty_msvc2013/libtiff-4.0.10/lib/ -ltiffd# PhoXi APIwin32:CONFIG(release, debug|release): LIBS += -L$$(PHOXI_CONTROL_PATH)/API/lib/ -lPhoXi_API_msvc12_Release_1.2.14else:win32:CONFIG(debug, debug|release): LIBS += -L$$(PHOXI_CONTROL_PATH)/API/lib/ -lPhoXi_API_msvc12_Debug_1.2.14
这个问题是我们配置qt的问题:
参考:
原本是
要改为自己的路径:
参考:
因为换了一个qt版本,之前的这些用不了,要用现在的,但是你也不知道要用那些,那么直接使用工具
QT为了简化生成发布版本,特别提供了工具 "windeplayqt.exe",这个工具在 "...\Qt5.8.0\5.8\msvc2015_64\bin"的目录下,通过该命令,可以解决上述错误。
windeplayqt.exe D:\code\qt\twocameras_fixed_updated-libs_included\build\debug\sample.exe
windeplayqt.exe D:\code\qt\twocameras_fixed_updated-libs_included\build\release\sample.exe
转载地址:http://qwwlf.baihongyu.com/