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. [Solved] Qt compiled, but applications won't start

[Solved] Qt compiled, but applications won't start

Scheduled Pinned Locked Moved Installation and Deployment
7 Posts 4 Posters 4.7k 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.
  • M Offline
    M Offline
    muued
    wrote on last edited by
    #1

    Hi,

    I "successfully" compiled Qt 4.7.2 with msvc10 on a windows 7 64bit machine.

    My call to configure looked like this
    configure.exe -qt-sql-sqlite -exceptions -platform win32-msvc2010 -no-qt3support -no-webkit -no-phonon -no-script -no-scripttools -opensource

    My problem is, that the applications deployed to the 'bin' directory fail to start (linguist, designer, assistant). Launching one of them ends up in a dialog saying "XXX has stopped working".

    The same happens for the example programs.

    When I compile my own applications, they work when compiled in debug mode, switching to release leads to applications having the problems mentioned above.

    I googled a lot, but didn't find anyone having similar problems.

    [ As I don't use phonon (-no-phonon), I did not install the PSDK and DirectX SDK linked to at the general requirements page. ]

    I'd appreciate any help - thanks in advance

    1 Reply Last reply
    0
    • C Offline
      C Offline
      conny
      wrote on last edited by
      #2

      Did you add the Qt bin dir to the PATH? If not, you should add it. It's needed so programs will find the Qt DLLs.

      1 Reply Last reply
      0
      • M Offline
        M Offline
        muued
        wrote on last edited by
        #3

        yes, the bin dir is in the path (I set the 'QTDIR' environment variable and put @%QTDIR%\bin@ into the path).
        I started applications like the linguist, assistant, ... from right out of the bin directory. So that should not be a source of the problem (I think this also excludes that I have multiple conflicting installations of Qt on my machine)

        1 Reply Last reply
        0
        • F Offline
          F Offline
          florent.revelut
          wrote on last edited by
          #4

          Are you sure your program is loading the correct version of Qt ?

          I had the same issue with an old p4 version, bundling a fairly old qt version with standard name.

          my programs in release were trying to load these dlls (e.g. qtCore.dll) whereas in debug, I had only mine (qtCore4d.dll)

          My advice : try to put QTDIR/bin at begin of your path instead of end : if it works, you've won ! Try to pinpoint where in the path is the conflicting lib (looks like a binary incompatibility in the interface, like trying to load 32bits lib from your 64bits program)

          Cheers

          1 Reply Last reply
          0
          • M Offline
            M Offline
            muued
            wrote on last edited by
            #5

            As far as I would know the current folder is used to look for dlls before any other folder in the path, so that should not be a problem when launching the applications in the bin directory of Qt using it as working directory.

            I just copied the executables from the bin directory together with all the dlls and some programs I wrote myself to my laptop (also 64 bit windows 7) that has no Qt on it.
            As expected I have exactly the same problems there.

            Sidenote: Using the same configure options, but msvc9 and win xp 32 bit in a virtual machine produces applications without problems, but I hate that it just doesn't work on my actual machine.

            About the 32/64 bit incompatibility ... I ran configure and nmake using the "Visual Studio x64 Win64 Command Prompt (2010)" where cl/? says:
            @
            C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC>cl /?
            Microsoft (R) C/C++ Optimizing Compiler Version 16.00.30319.01 for x64
            @

            1 Reply Last reply
            0
            • F Offline
              F Offline
              frostrun
              wrote on last edited by
              #6

              I had the same problem.
              Compiled Qt several times using msvc-2010 x64 with various configure options and wound up with the same results each time:
              Qt Tools didn't work, as did most of the examples. Same error messages as you had.

              After googling around for a bit I found out that it's a bug in the VC 2010 compiler. Compiling for x64 in release-mode with
              optimization level 2 (which is the case with Qt), and the VC screws up badly.

              Long story short: Microsoft released a hotfix for the problem. Just download and install it. Recompile Qt and have fun.
              "VC patch":http://archive.msdn.microsoft.com/KB2280741

              If you're interested in the whole story, "here":http://bugreports.qt.nokia.com/browse/QTBUG-11445 is the bug report.

              I recommend using jom instead of nmake for multicore CPUs. It's basically a nmake clone but executes several jobs at once based on the number of cores. (as GNU make with the j-option)
              It sped up my builds enormously.
              "Description":http://labs.qt.nokia.com/2009/03/27/speeding-up-visual-c-qt-builds/
              "Newest version":ftp://ftp.qt.nokia.com/jom/

              Hope this helps.

              1 Reply Last reply
              0
              • M Offline
                M Offline
                muued
                wrote on last edited by
                #7

                Thank you so much, that perfectly solved my problem.

                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