Results 1 to 13 of 13

Thread: I cannot run my executable file(exe file)!

  1. #1
    Join Date
    Mar 2015
    Posts
    24
    Thanks
    20
    Qt products
    Qt5 Qt/Embedded
    Platforms
    Windows

    Default I cannot run my executable file(exe file)!

    Hey guys
    I have a problem. I built the executable file(exe file) of my project but I cannot run it. I jut get this error:



    while I can run it in the QT but I cannot run it separately. I followed these two page but still nothing!:

    http://stackoverflow.com/questions/2...-in-qt-creator

    http://stackoverflow.com/questions/8...qt-application

  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: I cannot run my executable file(exe file)!

    You probably built your app with MinGW but you are trying to run it with MSVC compatible libraries. Where did you copy Qt5Core.dll from?
    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. The following user says thank you to wysota for this useful post:

    Ryan111 (31st March 2015)

  4. #3
    Join Date
    Mar 2015
    Posts
    24
    Thanks
    20
    Qt products
    Qt5 Qt/Embedded
    Platforms
    Windows

    Default Re: I cannot run my executable file(exe file)!

    Quote Originally Posted by wysota View Post
    ...Where did you copy Qt5Core.dll from?
    from this addres:

    Qt5.3.0\Tools\QtCreator\bin

    to this:

    Qt5.3.0\Tools\QtCreator\bin\build-8-32-Desktop_Qt_5_3_0_MinGW_32bit-Release\release

    Totally, how can I make a simple exe (of my project) without any extra file?

  5. #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: I cannot run my executable file(exe file)!

    This is a directory containing your QtCreator installation, not the one containing your Qt installation. The proper libraries are in Qt5.3.0\5.3.0\<something>\lib. Creating a build directory inside your QtCreator installation is an odd thing to do as well.
    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.


  6. The following user says thank you to wysota for this useful post:

    Ryan111 (31st March 2015)

  7. #5
    Join Date
    Mar 2015
    Posts
    24
    Thanks
    20
    Qt products
    Qt5 Qt/Embedded
    Platforms
    Windows

    Default Re: I cannot run my executable file(exe file)!

    Quote Originally Posted by wysota View Post
    This is a directory containing your QtCreator installation, not the one containing your Qt installation. The proper libraries are in Qt5.3.0\5.3.0\<something>\lib. Creating a build directory inside your QtCreator installation is an odd thing to do as well.
    Well that was the default suggestion of QT for creating the project and so I didn't change it.
    ok, I just created this directory:

    C:\Users\[my user]\Documents\8-32

    and I built my project in realese mode and when I run the program(by double click) again I get the error.

    Why we cannot make our project without any other files?

  8. #6
    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: I cannot run my executable file(exe file)!

    Quote Originally Posted by Ryan111 View Post
    Well that was the default suggestion of QT
    QT is QuickTime.
    Qt is an application development framework in a form of a set of libraries and tools.
    Qt Creator is an IDE based on Qt.

    Please don't mix the terms.

    and I built my project in realese mode and when I run the program(by double click) again I get the error.
    Did you copy the libraries?

    Why we cannot make our project without any other files?
    Ask uncle Bill.
    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.


  9. The following user says thank you to wysota for this useful post:

    Ryan111 (1st April 2015)

  10. #7
    Join Date
    Mar 2015
    Posts
    24
    Thanks
    20
    Qt products
    Qt5 Qt/Embedded
    Platforms
    Windows

    Question Re: I cannot run my executable file(exe file)!

    Quote Originally Posted by wysota View Post
    QT is QuickTime.
    Qt is an application development framework in a form of a set of libraries and tools.
    Qt Creator is an IDE based on Qt.

    Please don't mix the terms.
    QuickTime?
    What are you saying,bro? as far as I know we are speaking around Qt Creator and all things that you defined in your second sentence. aren't we?

    Quote Originally Posted by wysota View Post
    Did you copy the libraries?
    Which libs? where are those? and also where should I paste them?
    Quote Originally Posted by wysota View Post
    Ask uncle Bill.
    Each program we make must have these files?


    Added after 4 minutes:


    How do you make your programs? do you only do all above things? is there any standard way to make our programs?
    Last edited by Ryan111; 1st April 2015 at 13:08.

  11. #8
    Join Date
    Dec 2009
    Location
    New Orleans, Louisiana
    Posts
    791
    Thanks
    13
    Thanked 153 Times in 150 Posts
    Qt products
    Qt5
    Platforms
    MacOS X

    Default Re: I cannot run my executable file(exe file)!

    On Windows systems, use the dependency walker to identify the *exact* dll dependencies your executable will need to run correctly.

    Since you're using Qt5, you may also want to use windeployqt. I haven't used it personally because I don't do Windows, but the macdeployqt counterpart for OSX is very helpful.

    Good luck.

  12. The following user says thank you to jefftee for this useful post:

    Ryan111 (1st April 2015)

  13. #9
    Join Date
    Dec 2009
    Location
    New Orleans, Louisiana
    Posts
    791
    Thanks
    13
    Thanked 153 Times in 150 Posts
    Qt products
    Qt5
    Platforms
    MacOS X

    Default Re: I cannot run my executable file(exe file)!

    Quote Originally Posted by Ryan111 View Post
    Each program we make must have these files?
    It depends. If you dynamically link to the libraries, they must be resident in a location that they can be found to successfully launch the executable. That is not specific to Qt and applies to any program.

    You can build Qt such that it produces static libraries for Qt. If you link against those static libraries, the Qt code will become part of your executable. The executable will be *much* larger, but the benefit is that you can ship your executable without working about Qt run-time libraries being present on the target computer.

    When I first started with Qt, I thought I'd build static libraries to avoid having to deliver Qt libraries, however, I have standardized on the standard Qt distributions which are all dynamic libraries. Once you figure out how to package/distribute the Qt dynamic libraries with your app, it's really not a big deal.

    Just my $.02 worth.

  14. The following user says thank you to jefftee for this useful post:

    Ryan111 (2nd April 2015)

  15. #10
    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: I cannot run my executable file(exe file)!

    Quote Originally Posted by Ryan111 View Post
    QuickTime?
    What are you saying,bro?
    I am saying you should use the lowercase "t" when talking about Qt and that you should use the term "Qt Creator" when talking about the program that suggested you to create a build directory somewhere.

    Which libs?
    Those you have in your attachment to post #1.
    where are those?
    Post #4.
    and also where should I paste them?
    Post #3.

    Each program we make must have these files?
    That's how dynamic linking works in Windows. You can copy all those libraries to your C:\Windows\system equivalent instead if you want. Just be prepared for a DLL hell

    How do you make your programs? do you only do all above things? is there any standard way to make our programs?
    This is all standard stuff, you know. Totally unrelated to Qt itself. There is also a "Deploying an Application on Windows" article in Qt reference manual telling you the basic stuff you need to know. Of course you should have known that before...
    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.


  16. The following user says thank you to wysota for this useful post:

    Ryan111 (2nd April 2015)

  17. #11
    Join Date
    Mar 2015
    Posts
    24
    Thanks
    20
    Qt products
    Qt5 Qt/Embedded
    Platforms
    Windows

    Default Re: I cannot run my executable file(exe file)!

    Quote Originally Posted by wysota View Post
    I am saying you should use the lowercase "t" when talking about Qt and that you should use the term "Qt Creator" when talking about the program that suggested you to create a build directory somewhere.
    fine.
    Quote Originally Posted by wysota View Post
    That's how dynamic linking works in Windows. You can copy all those libraries to your C:\Windows\system equivalent instead if you want. Just be prepared for a DLL hell
    oh god.
    Quote Originally Posted by wysota View Post
    This is all standard stuff, you know. Totally unrelated to Qt itself. There is also a "Deploying an Application on Windows" article in Qt reference manual telling you the basic stuff you need to know. Of course you should have known that before...
    yeah, I have to have a look in it.
    Thanks dude.


    Added after 42 minutes:


    This video helped me to make my program:

    www.youtube.com/watch?v=raueG9n6rC4

    the size of release folder is 48MB. Too big!
    Last edited by Ryan111; 2nd April 2015 at 16:08.

  18. #12
    Join Date
    Dec 2009
    Location
    New Orleans, Louisiana
    Posts
    791
    Thanks
    13
    Thanked 153 Times in 150 Posts
    Qt products
    Qt5
    Platforms
    MacOS X

    Default Re: I cannot run my executable file(exe file)!

    Quote Originally Posted by Ryan111 View Post
    the size of release folder is 48MB. Too big!
    Too big for what? 48MB is nothing nowadays.

    Think of it this way, you can choose to not use Qt and write 100% of all of the code yourself. This will give you the smallest possible executable size and or redistribution package size. This would require, however, that you deal with all of the OS specific windowing/GUI requirements, file system, networking services, and on and on...

    Or you can benefit from the thousands of hours of coding and testing that goes into the creation/maintenance of Qt and write a fraction of the code yourself, and ship a 48MB package. As a side benefit, by using Qt, your code is portable to all major operating systems, so don't discount the benefit of that either!

    I know which choice I would make!

  19. #13
    Join Date
    Mar 2015
    Posts
    24
    Thanks
    20
    Qt products
    Qt5 Qt/Embedded
    Platforms
    Windows

    Default Re: I cannot run my executable file(exe file)!

    I will never leave Qt. it's cute!

Similar Threads

  1. associating file with executable
    By avanindra in forum Qt Programming
    Replies: 1
    Last Post: 1st September 2012, 08:27
  2. run a executable file
    By Ali Reza in forum Newbie
    Replies: 4
    Last Post: 17th June 2012, 21:09
  3. executable file not working
    By duma in forum Newbie
    Replies: 5
    Last Post: 31st August 2011, 08:48
  4. Replies: 5
    Last Post: 31st August 2011, 00:21
  5. Replies: 5
    Last Post: 15th June 2010, 08:42

Tags for this Thread

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.