博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
Window-安装qt-MVSC2013编译器--遇到问题-找不到opencv库
阅读量:2050 次
发布时间:2019-04-28

本文共 2998 字,大约阅读时间需要 9 分钟。

Window-安装qt-MVSC2013编译器

参考:

 

首先安装VS2013:

vs2013.5_pro_chs.iso

 

然后安装qt

这里我们先随便选一个版本:

因为这个版本不一定有MVSC2013版本,或者你直接下载一个有MSVC2013的:

(强烈建议直接安装这个)

 

但是我选择了没有MVSC2013版本的,练习一下步骤

这是别人的图,我当时只选择安装了红箭头指向的

 

然后找到安装路径下的:

MaintenanceTool.exe

 

选择设置:

 

清华大学的开源镜像站

 

红色箭头是原本安装的,红色圈出的是刚刚选择的:

然后会下载圈出的那部分进行安装

 

这里其实和直接安装

效果一样,但是为了学习一下才这么折腾下

 

正在下载和安装MSVC2013

 

1.找不到opencv的头文件,或者库文件Qt编译出错Error in " Util.asciify("build-helloworld-Desktop_Qt_5_6_1_MinGW_32bit-Debug")

我的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的问题:

参考:

原本是

要改为自己的路径:

 

2.解决 Qt5 报错 This application failed to start because it could not find or load the Qt platform plugin

参考:

 

因为换了一个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/

你可能感兴趣的文章
web.xml配置监听器,加载数据库信息配置文件ServletContextListener
查看>>
结构型模式之桥接模式(Bridge)
查看>>
行为型模式之状态模式(State)
查看>>
行为型模式之策略模式(Strategy)
查看>>
行为型模式之模板方法模式(TemplateMethod)
查看>>
行为型模式之访问者模式(Visitor)
查看>>
大小端详解
查看>>
source insight使用方法简介
查看>>
<stdarg.h>头文件的使用
查看>>
C++/C 宏定义(define)中# ## 的含义 宏拼接
查看>>
Git安装配置
查看>>
linux中fork()函数详解
查看>>
C语言字符、字符串操作偏僻函数总结
查看>>
Git的Patch功能
查看>>
分析C语言的声明
查看>>
TCP为什么是三次握手,为什么不是两次或者四次 && TCP四次挥手
查看>>
C结构体、C++结构体、C++类的区别
查看>>
进程和线程的概念、区别和联系
查看>>
CMake 入门实战
查看>>
绑定CPU逻辑核心的利器——taskset
查看>>