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. No Qt5 app will start after compilation with MSVC2012
QtWS25 Last Chance

No Qt5 app will start after compilation with MSVC2012

Scheduled Pinned Locked Moved General and Desktop
8 Posts 3 Posters 2.8k 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.
  • N Offline
    N Offline
    noob-programmer
    wrote on last edited by
    #1

    Hi everyone,

    I've downloaded Qt5 source code, compiled it by MSVC2012 in release mode and installed smoothly. However, I cannot launch any application such as Qt Designer, examples. When I try to run them, nothing happen, no error message, no log file, no background running (they just start and exit immediately). Could any one give me a couple of suggestions? Thank you.

    1 Reply Last reply
    0
    • U Offline
      U Offline
      utcenter
      wrote on last edited by
      #2

      Does your own code work?

      1 Reply Last reply
      0
      • N Offline
        N Offline
        noob-programmer
        wrote on last edited by
        #3

        I am new to Qt so I haven't got any project using Qt yet. I try to examine the examples in Qt project to practice but no example would run even when I copy them into the bin directory. The point is there is no error message so I couldn't figure out what's wrong. Maybe I have to try to build the project in debug mode to see what happen.

        1 Reply Last reply
        0
        • J Offline
          J Offline
          Jens
          wrote on last edited by
          #4

          According to http://qt-project.org/wiki/Qt_5.0, MSVC2012 is not listed as a supported platform yet. You might be better off downloading 2010 express and using the precompiled binaries until official support is added in a later Qt release.

          Note: I am pretty sure you can make it work, but it was not officially tested against the final release so if you are a beginner it might not be the simplest option.

          1 Reply Last reply
          0
          • U Offline
            U Offline
            utcenter
            wrote on last edited by
            #5

            Qt5 compiles effortlessly with MSVC2012, I can testify to that.

            Now, whether noob-programmer did a successful build or not is an entirely different topic.

            Try something very simple just to test it out, and figure whether it is a problem of the examples or your build, just paste this into a new Qt console application:

            @#include <QTextStream>
            QTextStream cout(stdout);

            int main(){
            cout << qVersion() << endl;
            }@

            If you don't get a neat 5.0.0 as output you have probably botched up the build process or haven't set up the toolchain properly... As Jens pointed out, for a beginner it is much easier and recommended to get precompiled binaries and use those with the MSVC2010 compiler from VS Express

            1 Reply Last reply
            0
            • N Offline
              N Offline
              noob-programmer
              wrote on last edited by
              #6

              I have just done as utcenter suggested and yes, there is a neat "5.0.0" on console screen. Here is the command I used to compile Qt5:

              @configure -opengl desktop -release -shared -opensource -no-incredibuild-xge -platform win32-msvc2012 -prefix C:\Qt5 -no-style-fusion -no-style-windowsxp -no-style-windowsvista -nomake tests
              nmake
              nmake install@

              If the compilation was ok, there may be something wrong with installation so no Qt app or example would run.

              I am using MSVC2012 to work on some projects which I want to integrate with Qt UI. I hate to convert them to older VC projects and do a bunch of configurations again :(

              I will try to compile Qt5 again in debug mode. Maybe there will be some error message appear in debug mode helping me understand the problem.

              1 Reply Last reply
              0
              • N Offline
                N Offline
                noob-programmer
                wrote on last edited by
                #7

                I've just finish building Qt5 again in both release and debug mode. When I tried to run an example (debug), an error message dialog occurred. Here is what the message said:

                Failed to load platform plugin "Windows". Available platform are: (blank, nothing here)

                Do you have any idea of how to fix this?

                1 Reply Last reply
                0
                • N Offline
                  N Offline
                  noob-programmer
                  wrote on last edited by
                  #8

                  I found the problem. The environment variable QT_QPA_PLATFORM_PLUGIN_PATH has not been set, so plugins cannot be found. I think this topic should be closed. All Qt apps now run perfectly.

                  Thank all you guys :)

                  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