Results 1 to 15 of 15

Thread: Problems with executing the *.exe file

  1. #1
    Join Date
    Feb 2010
    Posts
    7
    Thanks
    3
    Qt products
    Qt4
    Platforms
    Windows

    Default Problems with executing the *.exe file

    Each valid code compiles and then runs smoothly in last version of Qt Creator, but when I start the *. exe file, an error and message appears, that dll files(eg. minwgwm10.dll, libgcc_s_dw2-1.dll) were not found. I head something about static linking, but I do not know how to configure it.

    Thanks in advance!

  2. #2
    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: Problems with executing the *.exe file

    Quote Originally Posted by iksarp View Post
    Each valid code compiles and then runs smoothly in last version of Qt Creator, but when I start the *. exe file, an error and message appears, that dll files(eg. minwgwm10.dll, libgcc_s_dw2-1.dll) were not found. I head something about static linking, but I do not know how to configure it.

    Thanks in advance!
    try running from qt prompt.
    Your app can't find the required libs if you run from a regular prompt or if you double click the exe.
    Also you might want to study the following:
    http://doc.qt.nokia.com/4.6/deployment-windows.html

  3. The following user says thank you to schnitzel for this useful post:

    iksarp (26th February 2010)

  4. #3
    Join Date
    Feb 2010
    Posts
    7
    Thanks
    3
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Problems with executing the *.exe file

    thank you for your your help!

    my first problem: the "configure -static" is not working for me. it says:

    Unable to detect the platform from environment. Use -platform command lineargument or set the QMAKESPACE environment variable and run configure again.

    What should i do now? Where do i find QMAKESPACE and how to set it?

  5. #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: Problems with executing the *.exe file

    Did you run the configure from the Qt Prompt?

    Is there a particular reason that you need to build statically?

    The link I provided explains how to reconfigure but I would advise against it as it takes a long time.

  6. #5
    Join Date
    Aug 2008
    Location
    Algarve, Portugal
    Posts
    288
    Thanks
    23
    Thanked 32 Times in 28 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60

    Default Re: Problems with executing the *.exe file

    Each valid code compiles and then runs smoothly in last version of Qt Creator, but when I start the *. exe file
    I presume you're running from explorer, if this is the case probalbly you have to add qt dir to your system path. If you try to configure it statically please notice that there are some license issues if you dont have a commercial license. About statically configure, the forum wiki explains it very well.
    __________________________________________________
    My projects: calculator MathGraphica ; SuperEpicMegaHero game ; GooglePlay ; bitbucket ; github
    Like my projects ? Buy me a kofi

  7. The following user says thank you to john_god for this useful post:

    iksarp (27th February 2010)

  8. #6
    Join Date
    Feb 2010
    Posts
    7
    Thanks
    3
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Problems with executing the *.exe file

    Thank you everyone for your help, i managed to configure it with your tips.

  9. #7
    Join Date
    Dec 2009
    Posts
    33
    Thanks
    2
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Problems with executing the *.exe file

    My program terminates instantly when I try to run it from eclipse, and it produces the same error when I run it normally.
    How do you "run with qt prompt"? What qt prompt??

  10. #8
    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: Problems with executing the *.exe file

    It can be found in the Qt folder on the windows Start menu, right next to the shortcut for Qt Creator

  11. #9
    Join Date
    Dec 2009
    Posts
    33
    Thanks
    2
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Problems with executing the *.exe file

    Thanks, I found the prompt. But running it from there is causing the program to crash instead. The missing library is in qt/bin but adding this to PATH did not help.

  12. #10
    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: Problems with executing the *.exe file

    Quote Originally Posted by space_otter View Post
    Thanks, I found the prompt. But running it from there is causing the program to crash instead. The missing library is in qt/bin but adding this to PATH did not help.
    so it works from qt creator, but not from the qt prompt... hmmm
    try copying QtCore, QtGUI, mingw and that other dll into the folder where your executable is and run the program again
    Last edited by schnitzel; 28th February 2010 at 05:14.

  13. #11
    Join Date
    Dec 2009
    Posts
    33
    Thanks
    2
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Problems with executing the *.exe file

    No, it doesn't work with qt creator. It crashes with "exited with code -1073741819"

    I tried both debug & release.
    Last edited by space_otter; 28th February 2010 at 05:36.

  14. #12
    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: Problems with executing the *.exe file

    Quote Originally Posted by space_otter View Post
    No, it doesn't work with qt creator. It crashes with "exited with code -1073741819"
    my bad, I was thinking you were the thread's author.
    what's your program?

  15. #13
    Join Date
    Dec 2009
    Posts
    33
    Thanks
    2
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Problems with executing the *.exe file

    It has 24 files so far. It was working before (and it was cool too!) but something made it unhappy, and I can't put my finger on it. I'm guessing a change to the source code may have caused the error, In which case I'm in a real fix. I'll keep trying.

    Ha! I tried using the Qt Creator debugger and I'm getting some meaningful results. If I fix this I'll post again.

  16. #14
    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: Problems with executing the *.exe file

    totally different issue then and probably it is better if you open a new thread

  17. #15
    Join Date
    Dec 2009
    Posts
    33
    Thanks
    2
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Problems with executing the *.exe file

    Qt Code:
    1. this->setObjectName(name);
    2. this->mStack = new Stack(ui->decimalPlacesBox->value(), ui->accuracyBox->value());
    3.  
    4. connect(ui->accuracyBox, SIGNAL(valueChanged(int)), mStack, SLOT(setAccuracy(int)));
    5.  
    6. ui->setupUi(this); // should come first, was causing segmentation fault.
    7. ui->stackView->setModel(mStack);
    To copy to clipboard, switch view to plain text mode 

    Qt Code:
    1. QModelIndex Stack::parent ( const QModelIndex & index ) const {
    2. return index.parent();
    3. }
    To copy to clipboard, switch view to plain text mode 

    The previous caused an infinite loop. I blame this on the lack of clear documentation on QAbstractItemModel.

Similar Threads

  1. Problems saving a text file
    By aarelovich in forum Qt Programming
    Replies: 3
    Last Post: 27th September 2009, 14:39
  2. Replies: 0
    Last Post: 4th August 2009, 15:24
  3. Problems writing to file
    By DiamonDogX in forum Qt Programming
    Replies: 3
    Last Post: 24th April 2009, 16:01
  4. output while executing should be redirected to text file
    By AnithaRagupathy in forum Qt Programming
    Replies: 3
    Last Post: 13th October 2007, 10:33
  5. Executing SQL scripts from a file
    By William Wilson in forum Qt Programming
    Replies: 2
    Last Post: 30th August 2007, 19:28

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.