Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. Using Qt Creator 2.6.0 with Qt5
Forum Updated to NodeBB v4.3 + New Features

Using Qt Creator 2.6.0 with Qt5

Scheduled Pinned Locked Moved Qt Creator and other tools
10 Posts 5 Posters 5.0k 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
    GrahamL
    wrote on last edited by
    #1

    Hi
    I have downloaded Qt 5 and Qt Creator 2.6.0
    Used creator to make a GUI project (based on main window)
    Compiles ok
    When I run I get this error message
    @
    Starting C:\QTProjects\TestGui-build-std-Debug\debug\TestGui.exe...
    The program has unexpectedly finished.
    C:\QTProjects\TestGui-build-std-Debug\debug\TestGui.exe exited with code -1073741701
    @
    Can anyone tell me what is wrong?
    A QtConsole app compiles and runs successfully

    Thanks

    1 Reply Last reply
    0
    • sierdzioS Offline
      sierdzioS Offline
      sierdzio
      Moderators
      wrote on last edited by
      #2

      You need to give us some more information, preferably relevant parts of the source code.

      (Z(:^

      1 Reply Last reply
      0
      • G Offline
        G Offline
        GrahamL
        wrote on last edited by
        #3

        The source code is as simple as it gets
        The program is crashing before it hits main
        I think it is a dependancy problem

        1 Reply Last reply
        0
        • sierdzioS Offline
          sierdzioS Offline
          sierdzio
          Moderators
          wrote on last edited by
          #4

          You are not helping, you know.

          Check out the .pro file, then: it should have:
          @
          QT += core gui widgets
          @

          in Qt5.

          (Z(:^

          1 Reply Last reply
          0
          • G Offline
            G Offline
            GrahamL
            wrote on last edited by
            #5

            Ok, my apologies
            here is my .pro file
            @
            #-------------------------------------------------

            Project created by QtCreator 2012-11-09T12:41:27

            #-------------------------------------------------

            QT += core gui widgets

            greaterThan(QT_MAJOR_VERSION, 4): QT += widgets

            TARGET = Test
            TEMPLATE = app

            SOURCES += main.cpp
            mainwindow.cpp

            HEADERS += mainwindow.h

            FORMS += mainwindow.ui
            @

            and here is my main.cpp
            @
            #include "mainwindow.h"
            #include <QApplication>

            int main(int argc, char *argv[])
            {
            QApplication a(argc, argv);
            MainWindow w;
            w.show();

            return a.exec&#40;&#41;;
            

            }
            @
            All generated from within the creator IDE

            But it still wont run!

            Thanks for your time

            1 Reply Last reply
            0
            • sierdzioS Offline
              sierdzioS Offline
              sierdzio
              Moderators
              wrote on last edited by
              #6

              Looks fine. Make a clean and rebuild, take a look at "Compile Output" tab in QtCreator. Maybe ut has some hints.

              (Z(:^

              1 Reply Last reply
              0
              • G Offline
                G Offline
                GrahamL
                wrote on last edited by
                #7

                Hi
                This is the build log - cant see anything obvious
                @
                13:02:55: Running steps for project Test3...
                13:02:55: Starting: "C:\Qt\qt5\qtbase\bin\qmake.exe" C:\QTProjects\Test3\Test3.pro -r -spec win32-g++ "CONFIG+=qml_debug"
                13:02:56: The process "C:\Qt\qt5\qtbase\bin\qmake.exe" exited normally.
                13:02:56: Starting: "C:\mingw\bin\mingw32-make.exe"
                C:/mingw/bin/mingw32-make -f Makefile.Debug
                mingw32-make[1]: Entering directory 'C:/QTProjects/Test3-build-std-Debug'
                C:\Qt\qt5\qtbase\bin\uic.exe ..\Test3\mainwindow.ui -o ui_mainwindow.h
                g++ -c -pipe -fno-keep-inline-dllexport -g -frtti -Wall -Wextra -fexceptions -mthreads -DUNICODE -DQT_QML_DEBUG -DQT_DLL -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQT_OPENGL_ES_2 -DQT_OPENGL_ES_2_ANGLE -DQT_NEEDS_QMAIN -I..\Test3 -I"....\Qt\qt5\qtbase\include" -I"....\Qt\qt5\qtbase\include\QtWidgets" -I"....\Qt\qt5\qtbase\include\QtGui" -I"....\Qt\qt5\qtbase\include\QtCore" -I"debug" -I"." -I"." -I"....\Qt\qt5\qtbase\mkspecs\win32-g++" -o debug\main.o ..\Test3\main.cpp
                g++ -c -pipe -fno-keep-inline-dllexport -g -frtti -Wall -Wextra -fexceptions -mthreads -DUNICODE -DQT_QML_DEBUG -DQT_DLL -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQT_OPENGL_ES_2 -DQT_OPENGL_ES_2_ANGLE -DQT_NEEDS_QMAIN -I..\Test3 -I"....\Qt\qt5\qtbase\include" -I"....\Qt\qt5\qtbase\include\QtWidgets" -I"....\Qt\qt5\qtbase\include\QtGui" -I"....\Qt\qt5\qtbase\include\QtCore" -I"debug" -I"." -I"." -I"....\Qt\qt5\qtbase\mkspecs\win32-g++" -o debug\mainwindow.o ..\Test3\mainwindow.cpp
                C:\Qt\qt5\qtbase\bin\moc.exe -DUNICODE -DQT_QML_DEBUG -DQT_DLL -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQT_OPENGL_ES_2 -DQT_OPENGL_ES_2_ANGLE -DQT_NEEDS_QMAIN -I..\Test3 -I"....\Qt\qt5\qtbase\include" -I"....\Qt\qt5\qtbase\include\QtWidgets" -I"....\Qt\qt5\qtbase\include\QtGui" -I"....\Qt\qt5\qtbase\include\QtCore" -I"debug" -I"." -I"." -I"....\Qt\qt5\qtbase\mkspecs\win32-g++" -D__GNUC__ -DWIN32 ..\Test3\mainwindow.h -o debug\moc_mainwindow.cpp
                g++ -c -pipe -fno-keep-inline-dllexport -g -frtti -Wall -Wextra -fexceptions -mthreads -DUNICODE -DQT_QML_DEBUG -DQT_DLL -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQT_OPENGL_ES_2 -DQT_OPENGL_ES_2_ANGLE -DQT_NEEDS_QMAIN -I..\Test3 -I"....\Qt\qt5\qtbase\include" -I"....\Qt\qt5\qtbase\include\QtWidgets" -I"....\Qt\qt5\qtbase\include\QtGui" -I"....\Qt\qt5\qtbase\include\QtCore" -I"debug" -I"." -I"." -I"....\Qt\qt5\qtbase\mkspecs\win32-g++" -o debug\moc_mainwindow.o debug\moc_mainwindow.cpp
                g++ -Wl,-subsystem,windows -mthreads -o debug\Test3.exe debug/main.o debug/mainwindow.o debug/moc_mainwindow.o -lmingw32 -lqtmaind -LC:/Qt/qt5/qtbase/lib -lQtWidgetsd5 -LC:/Qt/qt5/qtbase/lib -lQtGuid5 -LC:/Qt/qt5/qtbase/lib -lQtCored5 -llibEGL -llibGLESv2 -lgdi32 -luser32
                mingw32-make[1]: Leaving directory 'C:/QTProjects/Test3-build-std-Debug'
                13:03:01: The process "C:\mingw\bin\mingw32-make.exe" exited normally.
                @

                1 Reply Last reply
                0
                • JKSHJ Offline
                  JKSHJ Offline
                  JKSH
                  Moderators
                  wrote on last edited by
                  #8

                  I experienced mysterious crashes with Qt 4.8, when I used a compiler version that was incompatible with my Qt libraries.

                  What version of GCC are you using? Is it 32-bit or 64-bit?

                  How did you obtain your Qt 5 binaries?

                  Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

                  1 Reply Last reply
                  0
                  • J Offline
                    J Offline
                    john_god
                    wrote on last edited by
                    #9

                    I bet you have some based Qt program installed in your Windows, that deployed some old Qt dlls to your windows sistem32 directory. Probably you didnt set your windows path with qt5 dll directory wich is causing your .exe file to link agains wrong dlls. Copy your exe file to a new directory, togheter with all the needed dlls of Qt5: qtcore.dll , qtgui.dll, ... (I cant remember the exact dll names, I not on windows right now), I bet it will work.
                    If that work, and if you have qt dll in your system32 probably you will have to replaced them with qt5 dlls. This is the famous dllhell.

                    1 Reply Last reply
                    0
                    • Y Offline
                      Y Offline
                      yupifourbi
                      wrote on last edited by
                      #10

                      I think this problem inherited from qt 4.8.3, where the compiler build for 64 bit windows 7 machine.

                      I tried http://www.dependencywalker.com/ for my portedcanvas.exe and found that 3 dll (IEShims.dll, sysntfy.dll, gpsvc.dll are for 64 bit os machine).

                      my problem solved by download MinGW 4.4 from Nokia website.
                      ftp://ftp.qt.nokia.com/misc/MinGW-gcc440_1.zip [ftp.qt.nokia.com]

                      Thanks.

                      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