Results 1 to 4 of 4

Thread: Problem building a .exe windows Qt app

  1. #1
    Join Date
    Aug 2014
    Posts
    11
    Qt products
    Qt4 Qt5
    Platforms
    Windows

    Default Problem building a .exe windows Qt app

    I have been away from Qt for several years. However, I was able to port my Qt app (written a while back) to Qt 5.3/QCreator 3.1.2. Now I want to build a windows .exe file to run on the same computer containing Qt. I read that I need to do the following in my project directory.

    nmake clean
    make -config release
    nmake

    I am not sure if this is correct because I can't find nmake on my machine and don't know where to get the copy I need. I thought QCreator would build a .exe, but my efforts did not pay off.

    Thanks for any suggestions,
    Mike

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Problem building a .exe windows Qt app

    nmake is part of visual studio, so if you are not using it, you should use make bundled with MinGW compiler that comes with Qt Creator. However it should be easiest to simply open your project in Creator, set it up and hit the build button.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  3. #3
    Join Date
    Aug 2014
    Posts
    11
    Qt products
    Qt4 Qt5
    Platforms
    Windows

    Default Re: Problem building a .exe windows Qt app

    wysota,

    Thanks for your reply. It seems QCreator works a little different than earlier Qt Design. My pro file specified a build directory, but QCreator did not use it. Instead it made a build directory in the folder containing my project folder. Once I found it, the .exe file was there but won't run due to missing QtCore5.dll. I am not trying to do a deployment build. I thought it would find the needed .dll if running on the same machine as Qt. I guess I still need help. I'll try copying QtCore5.dll to correct system file. Doesn't seem like I should have to do that though.


    Added after 19 minutes:


    wysota,

    I located the Qt5Core.dll and put its location in system PATH and my app runs correctly.
    Thanks again.
    Last edited by mikea; 1st October 2014 at 17:27.

  4. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Problem building a .exe windows Qt app

    Quote Originally Posted by mikea View Post
    My pro file specified a build directory, but QCreator did not use it. Instead it made a build directory in the folder containing my project folder.
    That's what you told it to do when importing the project.

    I thought it would find the needed .dll if running on the same machine as Qt.
    Windows doesn't do that, really. It looks in the system path and in the directory containing the executable. Qt has nothing to do with that.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


Similar Threads

  1. QT4.8.3+Windows Static Libs Building Project problem
    By sa in forum Installation and Deployment
    Replies: 0
    Last Post: 22nd January 2013, 11:57
  2. Building Qt for 64 bit windows.
    By chris_helloworld in forum Installation and Deployment
    Replies: 1
    Last Post: 16th May 2011, 09:12
  3. Problem building the OCI Plugin on Windows
    By Harald Klingel in forum Installation and Deployment
    Replies: 0
    Last Post: 18th January 2011, 18:12
  4. Problem building Qt on MS windows server 64bit system
    By _patrice_ in forum Installation and Deployment
    Replies: 0
    Last Post: 9th July 2010, 22:32
  5. Problem building Qt4.1.0 with thread support on windows XP
    By pavithra in forum Installation and Deployment
    Replies: 1
    Last Post: 1st April 2006, 12:35

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.