Qt 5.5 Mingw(gcc 4.9.2)编译但无法运行项目

时间:2015-12-12 17:29:38

标签: c++ qt mingw

我对Qt很新,我在使用Windows 7上的Mingw 4.9.2在Qt Creator下运行Qt 5.5项目时遇到了一些困难。我可以编译它而没有任何错误但是当我尝试运行时没有任何反应,Qt Creator只是冻结,我必须杀死它。我也尝试从cmd手动启动它,结果相同。更多信息:

  • 我在Qt的官方网站安装程序中安装了Qt和Mingw
  • 我在我的全局路径中添加了以下行:
    • C:\ Qt的\工具\ mingw492_32 \ BIN;
    • C:\ Qt的\ 5.5 \ msvc2013_64 \ BIN;
    • C:\ Qt的\ 5.5 \ mingw492_32 \ BIN;
  • 我在Ubuntu 14.04(gcc 4.8.4)下运行此项目没有任何问题

这是我的.pro文件:

QT       += core gui

greaterThan(QT_MAJOR_VERSION, 4): QT += widgets

TARGET = SmashReader
TEMPLATE = app


SOURCES += main.cpp\
        mainwindow.cpp \
    player.cpp

HEADERS  += mainwindow.h \
    player.h
FORMS    += mainwindow.ui

# Opencv Library
INCLUDEPATH += C:\opencv\build\include
LIBS += C:\opencv-build\lib\libopencv_core300.dll.a
LIBS += C:\opencv-build\lib\libopencv_imgproc300.dll.a
LIBS += C:\opencv-build\lib\libopencv_highgui300.dll.a
LIBS += C:\opencv-build\lib\libopencv_videoio300.dll.a

我也在尝试使用OpenCV lib,但是在没有它的情况下我在另一个项目上遇到同样的问题所以我假设它不是来自这里。

当我点击“运行”按钮时,编译输出给了我:

C:/Qt/Tools/mingw492_32/bin/mingw32-make -f Makefile.Debug
mingw32-make[1]: Entering directory 'C:/Users/Théo/Documents/Programmation/SmashReader'
mingw32-make[1]: Nothing to be done for 'first'.
mingw32-make[1]: Leaving directory 'C:/Users/Théo/Documents/Programmation/SmashReader'

然后Qt Creator不再响应了。

任何想法都会受到赞赏。

感谢。

0 个答案:

没有答案
相关问题