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. App is not a valid Win32 application

App is not a valid Win32 application

Scheduled Pinned Locked Moved Solved General and Desktop
mingw64windows xpqt4.8qt5.4
4 Posts 2 Posters 6.2k 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.
  • Y Offline
    Y Offline
    yeckel
    wrote on 23 Jun 2015, 07:44 last edited by A Former User
    #1

    Hi I'm porting an legacy app from Qt4.8.5 to Qt5.4.2 and compiler Mingw 3.4.5 to 4.8.4 (4.9.1) on WinXP. It's using dozen libraries (dll) from another project which I've also migrated. Everything compiles fine, however when trying to run I'm getting: "Cannot execute "": %1 is not a valid Win32 application." and in console (cmd): "Access denied".
    I was checking that app in tool called Execinfo and it says, that my executable is" SHARED LIBRARY". The TEMPLATE=app. Tool named Dependency Walker shows all (qt5 and custom) DLLs are available, and x86.
    I tried making hello world main, without includes just the same pro file and result is the same.
    Independent hello world app as well as that very few test that exists are running (are executable) fine. Any suggestion how to proceed? How to check on WinXP what's going on? I'm Windows newbie. Thanks.

    1 Reply Last reply
    0
    • K Offline
      K Offline
      koahnig
      wrote on 23 Jun 2015, 08:07 last edited by
      #2

      Did you follow also the windows deployment guide?
      The dependency walker cannot show those required plugins.

      Can you actually compile and link one of the "hello world" stuff yourself?
      Or are you simply starting already compiled versions?

      Vote the answer(s) that helped you to solve your issue(s)

      1 Reply Last reply
      0
      • Y Offline
        Y Offline
        yeckel
        wrote on 23 Jun 2015, 08:42 last edited by
        #3

        Ok, I've found it. In one of the includes inside the qmake pro file was:
        CONFIG += dll
        This was causing the exe file (TEMPLATE=app) to behave like library dll and those weird errors. Dependency walker was then able to show me all the dependencies fulfilled BUT the option Profile->Start Profiling was disabled. This is enables jut for executable exe files :-) I tried renaming dll file to exe and the errors were the same.

        1 Reply Last reply
        0
        • K Offline
          K Offline
          koahnig
          wrote on 23 Jun 2015, 09:18 last edited by
          #4

          Good to know that you have found your problem and solved it.

          Please mark thread as solved. This makes it easier for others.

          Vote the answer(s) that helped you to solve your issue(s)

          1 Reply Last reply
          0

          4/4

          23 Jun 2015, 09:18

          • Login

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