Results 1 to 5 of 5

Thread: .EXE error when trying to run Application

  1. #1
    Join Date
    Dec 2009
    Posts
    2
    Qt products
    Qt4
    Platforms
    Windows

    Default .EXE error when trying to run Application

    Hello,
    I'm using QtCreator through which the program compiles and builds sucessfully. However, when I try to double click the EXE file from the folder, it gives me an error saying "mingw10.dll was not found".

    Can someone please suggest what needs to be done for this? I haven't used any command line tools so far as I'm doing everything through QtCreator. Are there any options for this in QtCreator itself? I'm running a Windows 7 64-bit system.

    Thanks

  2. #2
    Join Date
    Mar 2010
    Posts
    2
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: .EXE error when trying to run Application

    Hi,
    The simplest solution is to copy the following files from your QT installation folder into your release build folder:

    QtCore4.dll
    QtGui4.dll
    libgcc_s_dw2-1.dll
    mingwm10.dll

    But I am not sure if this means we have to copy these files to the user when we deploy our applications. There must be a more 'formal' solution I don't know yet, as I am also a newbee...

  3. #3
    Join Date
    Sep 2009
    Location
    UK
    Posts
    2,447
    Thanks
    6
    Thanked 348 Times in 333 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: .EXE error when trying to run Application

    You need to copy those files to the user when you deploy your application.

    If you want to use a single executable, then you must buy commercial license, or distribute your work under the GPL and offer anyone who asks the source code.

  4. #4
    Join Date
    Oct 2009
    Posts
    364
    Thanks
    10
    Thanked 37 Times in 36 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: .EXE error when trying to run Application

    This link might help:
    http://doc.qt.nokia.com/4.6/deployment-windows.html

    Once you figure out all the dlls/plugins etc. you can use a third party installer creation tool such as nullsoft's NSIS.

  5. #5
    Join Date
    Jun 2007
    Location
    Louisiana
    Posts
    77
    Thanks
    1
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: .EXE error when trying to run Application

    It is obvious from your reference to mingw10.dll and .exe that you are on Windows. Fortunately for us, Qt has made the solution to your problem somewhat simple for us.

    Follow these steps:
    1) create a desktop shortcut and name it as you will.
    2) right click on the shortcut and select Properties
    3) in the shortcut tab of Properties edit the Target value to read "%COMSPEC% /k "C:\Qt\2009.03\bin\qtenv.bat" or where ever your Qt SDK install is located.
    4) edit the Start In value to be your project folder
    5) double click the shortcut to open the command window.
    6) cd to where your exe is located - release or debug
    7) type the entire name of your exe file (e.g. ./myapp.exe)

    This procedure will set up the Qt environment and allow you to run your exe without substantial changes or copying files. Subtile variations from the normal Qt environment can be accommodated by copying the qtenv.bat file somewhere and editing it to fit your needs. The run your edited batch file.

Similar Threads

  1. Replies: 8
    Last Post: 5th November 2012, 08:43
  2. Application gives error when build using Qt 4.4.3
    By santosh.kumar in forum Qt Programming
    Replies: 1
    Last Post: 11th November 2008, 18:36
  3. getting the error message when trying to run the application in QT
    By pallavi Boyapat in forum Qt Programming
    Replies: 49
    Last Post: 31st October 2008, 12:18
  4. QWT application initialization error
    By Urban in forum Qwt
    Replies: 3
    Last Post: 17th September 2008, 10:17
  5. Exception Error in my application.
    By Tavit in forum Qt Programming
    Replies: 1
    Last Post: 6th August 2008, 12:02

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
  •  
Qt is a trademark of The Qt Company.