Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. [SOLVED]Qt Creator default project not building
QtWS25 Last Chance

[SOLVED]Qt Creator default project not building

Scheduled Pinned Locked Moved General and Desktop
qtcreatorbuildqtwidgetsexe
10 Posts 3 Posters 13.9k Views
  • 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.
  • P Offline
    P Offline
    pigman980
    wrote on last edited by pigman980
    #1

    I have installed Qt Creator using Qt 5, and I created a new Qt Widgets project. I then attempted to build the project, and there were no error messages. However, when I ran the project, I got an error message saying:

    Starting C:\QtProjects\build-QtWidgetsTest-Desktop_Qt_5_4_1_MSVC2010_OpenGL_32bit-Debug\debug\QtWidgetsTest.exe...
    Failed to start program. Path or permissions wrong?
    C:\QtProjects\build-QtWidgetsTest-Desktop_Qt_5_4_1_MSVC2010_OpenGL_32bit-Debug\debug\QtWidgetsTest.exe exited with code -1

    I had a look in the project's build directory and found there was no .exe file. When I built the project again, an exe file appeared, but running it caused it to disappear, saying that Windows could not find the file.

    Is there something I might not have done?

    1 Reply Last reply
    0
    • M Offline
      M Offline
      mcosta
      wrote on last edited by
      #2

      HI and welcome to devnet,

      are your settings correct?
      Check for:

      • Compiler
      • Qt version
      • Kits

      in Qt Creator preferences

      Once your problem is solved don't forget to:

      • Mark the thread as SOLVED using the Topic Tool menu
      • Vote up the answer(s) that helped you to solve the issue

      You can embed images using (http://imgur.com/) or (http://postimage.org/)

      ArasuA 1 Reply Last reply
      0
      • P Offline
        P Offline
        pigman980
        wrote on last edited by
        #3

        Hi,
        I checked my settings in Tools->Options.
        The kit used is Desktop Qt 5.4.1 MSVC2010 OpenGL 32bit (default), which was the only one available when I created the project.
        The kit is using the Microsoft Visual C++ compiler 10.0 and the Qt version is 5.4.1.
        Is anything wrong with these settings?

        1 Reply Last reply
        0
        • M Offline
          M Offline
          mcosta
          wrote on last edited by mcosta
          #4

          You said that the build is executed correctly; right?

          So, go with the Explorer into the destination directory and double click on the executable.
          What happens?

          Have you some special Deployment steps? (See Projects Tab)

          Once your problem is solved don't forget to:

          • Mark the thread as SOLVED using the Topic Tool menu
          • Vote up the answer(s) that helped you to solve the issue

          You can embed images using (http://imgur.com/) or (http://postimage.org/)

          1 Reply Last reply
          0
          • P Offline
            P Offline
            pigman980
            wrote on last edited by
            #5

            Ok, so now it's suddenly working. No idea what happened there.
            All I did was create an option on the menu bar on the default ui file and it built properly, and I could run it from within Qt creator. Weird.
            When I try to run the executable on its own, I get a different error where the Qt5 dll is not found, but that should be easy to fix.

            M 1 Reply Last reply
            0
            • P pigman980

              Ok, so now it's suddenly working. No idea what happened there.
              All I did was create an option on the menu bar on the default ui file and it built properly, and I could run it from within Qt creator. Weird.
              When I try to run the executable on its own, I get a different error where the Qt5 dll is not found, but that should be easy to fix.

              M Offline
              M Offline
              mcosta
              wrote on last edited by
              #6

              @pigman980 said:

              When I try to run the executable on its own, I get a different error where the Qt5 dll is not found, but that should be easy to fix.

              This is normal if you don't add the directory where the Qt libs are into the PATH variable

              Once your problem is solved don't forget to:

              • Mark the thread as SOLVED using the Topic Tool menu
              • Vote up the answer(s) that helped you to solve the issue

              You can embed images using (http://imgur.com/) or (http://postimage.org/)

              1 Reply Last reply
              0
              • P Offline
                P Offline
                pigman980
                wrote on last edited by
                #7

                Ok, now it's running fine both in Qt Creator and out. Thanks for your help.
                I have no idea what I did to solve the original problem, but it's solved now. I created a second project and that one worked as well.

                1 Reply Last reply
                0
                • M Offline
                  M Offline
                  mcosta
                  wrote on last edited by
                  #8

                  ok,

                  You're welcome

                  Happy Programming

                  Once your problem is solved don't forget to:

                  • Mark the thread as SOLVED using the Topic Tool menu
                  • Vote up the answer(s) that helped you to solve the issue

                  You can embed images using (http://imgur.com/) or (http://postimage.org/)

                  1 Reply Last reply
                  0
                  • M mcosta

                    HI and welcome to devnet,

                    are your settings correct?
                    Check for:

                    • Compiler
                    • Qt version
                    • Kits

                    in Qt Creator preferences

                    ArasuA Offline
                    ArasuA Offline
                    Arasu
                    wrote on last edited by
                    #9

                    @mcosta Hi mcosta,

                    I have to installed QT creator ver 4.8 and i have one project, it developed QT creator ver 4.5 in Linux platform on 2008. Now i want to update some changes for feature enhancement. i had to try to compile and run the project successfully, but i could't get the output screen. the (.pro) file generated only the .exe file only. How can i get the resultant output UI screen, what will i made for that.

                    1 Reply Last reply
                    0
                    • M Offline
                      M Offline
                      mcosta
                      wrote on last edited by
                      #10

                      HI,

                      I suggest to open a new post because you marked this as SOLVED.
                      BTW if you moved to windows and want to see the debug output you should add

                      CONFIG += console
                      

                      to your .pro file

                      Once your problem is solved don't forget to:

                      • Mark the thread as SOLVED using the Topic Tool menu
                      • Vote up the answer(s) that helped you to solve the issue

                      You can embed images using (http://imgur.com/) or (http://postimage.org/)

                      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