Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. Unable to Run a Qt project
Forum Updated to NodeBB v4.3 + New Features

Unable to Run a Qt project

Scheduled Pinned Locked Moved Unsolved Installation and Deployment
6 Posts 2 Posters 2.3k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • G Offline
    G Offline
    Gianmarco
    wrote on last edited by Gianmarco
    #1

    Hello, i've installed QT 5.5.1 with MinGw, everything was fine, i've hopened QtCreator and made an empty project like this :

    #ifndef MAINWINDOW_H
    #define MAINWINDOW_H
    
    #include <QMainWindow>
    
    class MainWindow : public QMainWindow
    {
        Q_OBJECT
    
    public:
        MainWindow(QWidget *parent = 0);
        ~MainWindow();
    };
    
    #endif // MAINWINDOW_H
    
    #include "mainwindow.h"
    
    MainWindow::MainWindow(QWidget *parent)
        : QMainWindow(parent)
    {
    }
    
    MainWindow::~MainWindow()
    {
    
    }
    
    
    #include "mainwindow.h"
    #include <QApplication>
    
    int main(int argc, char *argv[])
    {
        QApplication a(argc, argv);
        MainWindow w;
        w.show();
    
        return a.exec();
    }
    
    
    
    #-------------------------------------------------
    #
    # Project created by QtCreator 2015-12-11T18:07:48
    #
    #-------------------------------------------------
    
    QT       += core gui
    
    greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
    
    TARGET = test4
    TEMPLATE = app
    
    
    SOURCES += main.cpp\
            mainwindow.cpp
    
    HEADERS  += mainwindow.h
    
    

    As u can see, it's a totally clean project.
    If i hit "Compile" it works without any kind of problem, but as soon as i hit "run" button Qt Crashes....any idea?
    Thanks

    Note :
    OS : Windows 10

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by SGaist
      #2

      Hi and welcome to devnet,

      What do you get if you run your application through the debugger ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • G Offline
        G Offline
        Gianmarco
        wrote on last edited by Gianmarco
        #3
        The gdb process has not responded to a command within 40 second(s). This could mean it is stuck in an endless loop or taking longer than expected to perform the operation.
        You can choose between waiting longer or aborting debugging.
        

        Updata : noticed that when Qt freeze before the crash, Explorer.exe freexes and crash too.

        
        03:00:29: Running steps for project test4...
        03:00:29: Configuration unchanged, skipping qmake step.
        03:00:29: Starting: "C:\Qt\Qt5.5.1\Tools\mingw492_32\bin\mingw32-make.exe" 
        C:/Qt/Qt5.5.1/Tools/mingw492_32/bin/mingw32-make -f Makefile.Debug
        mingw32-make[1]: Entering directory 'C:/Users/Gianmarco/Documents/build-test4-Desktop_Qt_5_5_1_MinGW_32bit-Debug'
        g++ -Wl,-subsystem,windows -mthreads -o debug\test4.exe debug/main.o debug/mainwindow.o debug/moc_mainwindow.o  -lmingw32 -LC:/Qt/Qt5.5.1/5.5/mingw492_32/lib -lqtmaind -lshell32 -lQt5Widgetsd -lQt5Guid -lQt5Cored 
        C:/Qt/Qt5.5.1/Tools/mingw492_32/bin/../lib/gcc/i686-w64-mingw32/4.9.2/../../../../i686-w64-mingw32/bin/ld.exe: cannot open output file debug\test4.exe: Permission denied
        collect2.exe: error: ld returned 1 exit status
        Makefile.Debug:81: recipe for target 'debug\test4.exe' failed
        mingw32-make[1]: *** [debug\test4.exe] Error 1
        mingw32-make[1]: Leaving directory 'C:/Users/Gianmarco/Documents/build-test4-Desktop_Qt_5_5_1_MinGW_32bit-Debug'
        makefile:34: recipe for target 'debug' failed
        mingw32-make: *** [debug] Error 2
        03:00:30: The process "C:\Qt\Qt5.5.1\Tools\mingw492_32\bin\mingw32-make.exe" exited with code 2.
        Error while building/deploying project test4 (kit: Desktop Qt 5.5.1 MinGW 32bit)
        When executing step "Make"
        03:00:30: Elapsed time: 00:01.
        
        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          Any chance of having an anti-virus running ?

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          G 1 Reply Last reply
          0
          • SGaistS SGaist

            Any chance of having an anti-virus running ?

            G Offline
            G Offline
            Gianmarco
            wrote on last edited by
            #5

            @SGaist Yeah maybe, anyway i've fixed it by installing Linux... and no, i'm not kidding. Thanks anyway

            1 Reply Last reply
            0
            • SGaistS Offline
              SGaistS Offline
              SGaist
              Lifetime Qt Champion
              wrote on last edited by
              #6

              Certain anti-virus are pretty protective when there are new executables created on the file system so they directly put in on quarantine.

              Switching OSes is also a good solution :)

              Interested in AI ? www.idiap.ch
              Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

              1 Reply Last reply
              0

              • Login

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • Users
              • Groups
              • Search
              • Get Qt Extensions
              • Unsolved