Results 1 to 20 of 24

Thread: Runtime problem in Release mode

Hybrid View

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

    Default Re: Runtime problem in Release mode

    You are using the wrong DLL. Use the one in the 'qt/bin' dir rather than the one in the 'bin' dir. For a test, you can copy it to your apps release folder.

  2. #2
    Join Date
    Apr 2007
    Posts
    6
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Runtime problem in Release mode

    Hi, I had not realized there are two bin folders, \qt\bin and \bin. What's the difference between the two?

    Unfortunately, by copying one or the other dll in my release folder, I still get an "entry point not found" error. It happens on two different entry points, but still an error.

  3. #3
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: Runtime problem in Release mode

    Quote Originally Posted by benelgiac View Post
    Hi, I had not realized there are two bin folders, \qt\bin and \bin. What's the difference between the two?
    The files in the /bin directory are the runtime libraries against which the bundled Qt Creator has been built. They have probably been built using the Microsoft VC++ compiler. The files in /qt/bin are the runtime libraries (debug and release) as built using the bundled MingW compiler. These are the files Qt Creator will use when it builds and runs your program, and the files you should deploy.

    The separation is there to allow the Qt Creator to run independently of any version of Qt, or set of configuration settings, you may be developing your application against.

  4. #4
    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: Runtime problem in Release mode

    Quote Originally Posted by fatjuicymole View Post
    You are using the wrong DLL.
    No he is not. I have the same problem, I already tested all the qtcore4.dll, copy all of them, did lots os tests, and the problems persists. I put a thread the forum "instalation and deployment" and still havent figured this out. Is not the code either because runs fine in linux, and happens the same with empty projects, works good in debug and crashes in release. I'm using Vista.
    __________________________________________________
    My projects: calculator MathGraphica ; SuperEpicMegaHero game ; GooglePlay ; bitbucket ; github
    Like my projects ? Buy me a kofi

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

    Default Re: Runtime problem in Release mode

    Well, what can I say? "Unable to find entry point" means exactly that - that it can't find that particular function in the DLL file. Since Qt ships with pretty much every function available in the DLL, the only explanation is that the system is trying to use a custom-compiled QtCore DLL which doesn't have the function that the program needs. If the function wasn't in the DLL, the linker would complain when you ran it, as it wouldn't be able to find the function in the dynamic version of the .a file either.

    Maybe you should host your executable which doesn't work somewhere for someone else to test. If it works on there PC, then it's definitely a DLL issue.

  6. #6
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,360
    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: Runtime problem in Release mode

    Quote Originally Posted by fatjuicymole View Post
    Since Qt ships with pretty much every function available in the DLL, the only explanation is that the system is trying to use a custom-compiled QtCore DLL which doesn't have the function that the program needs.
    Or that the function is at different offset in the library which may happen when trying to run the application against a different version of the library it was linked against (i.e. running against 4.7 while building against 4.6). Which may happen exactly when you take the dll from qtsdk\bin\ instead of qtsdk\qt\bin as already mentioned. Maybe the export library is broken?
    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.


  7. #7
    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: Runtime problem in Release mode

    Quote Originally Posted by wysota View Post
    Maybe the export library is broken?
    can you explain this ?
    Here is a exe from a empty project, if someone could test it, thank you.
    Attached Files Attached Files
    __________________________________________________
    My projects: calculator MathGraphica ; SuperEpicMegaHero game ; GooglePlay ; bitbucket ; github
    Like my projects ? Buy me a kofi

  8. #8
    Join Date
    Dec 2009
    Posts
    26
    Thanks
    3
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Runtime problem in Release mode

    Hi,

    The attached exe file in XP producing same error. I also tried Win7. Same thing had happened as mentioned by benelgiac. It is running fine in debug mode. In release mode only qt creator can run the exe . But in Xp nothing is running .

    regards
    rittchat

  9. #9
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,360
    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: Runtime problem in Release mode

    Quote Originally Posted by john_god View Post
    can you explain this ?
    What exactly? If the export library is incorrect then the resulting executable will not link against an incompatible dll during runtime.
    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.


  10. #10
    Join Date
    Jul 2009
    Posts
    42
    Thanks
    4
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Runtime problem in Release mode

    When I began programming with QT earlier this year I ran into the same Problem.

    When you run from Creator everything works fine. But when you run the EXE it complains about missing DLL(s).

    I think this has something to do with the build configuration... (have not found how to solve it here)

    But, i found that if you copy the Dlls into the applicationfolder it will link and run... You might need more than 1 dll, depending on what Qt Modules your programm uses.

    For me it was necesary to copy following Files (Application is a Custom rich Text Editor)

    mingwm10.dll
    msvcrt.dll
    QtCore4.dll
    QtGui4.dll

    Somewhere I found an Article that lead me to this solution including a small app called "Depends" which will help you find out which dlls your exe needs.

    I hope this helps...

    Eric

  11. #11
    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: Runtime problem in Release mode

    Quote Originally Posted by wysota View Post
    What exactly?
    I dont know what a export library is, is it the dll ? I deleted the previous Qt version before installng the current one, so there shouldnt be older dll to cause caos.

    Quote Originally Posted by wysota View Post
    Maybe the export library is broken?
    How can I fix it?
    __________________________________________________
    My projects: calculator MathGraphica ; SuperEpicMegaHero game ; GooglePlay ; bitbucket ; github
    Like my projects ? Buy me a kofi

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

    Default Re: Runtime problem in Release mode

    Quote Originally Posted by john_god View Post
    I dont know what a export library is, is it the dll ? I deleted the previous Qt version before installng the current one, so there shouldnt be older dll to cause caos.
    You should search your system to ensure that is the case. Any application can install the Qt libraries and modify your system search path.

  13. #13
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,360
    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: Runtime problem in Release mode

    Quote Originally Posted by john_god View Post
    I dont know what a export library is, is it the dll ?
    No. It has a "lib" extension for MSVC libraries and "a" for MinGW ones.

    I deleted the previous Qt version before installng the current one, so there shouldnt be older dll to cause caos.
    If you have Qt SDK installed, you have at least two versions of Qt in your system.
    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. problem with mouse release on the border, help me!
    By dungsivn in forum Qt Programming
    Replies: 1
    Last Post: 25th June 2007, 08:16
  2. qodbc driver not loaded error in release mode
    By mandal in forum Qt Programming
    Replies: 1
    Last Post: 14th November 2006, 09:42
  3. Problem with Debug mode in KDevelop
    By zlatko in forum KDE Forum
    Replies: 1
    Last Post: 16th June 2006, 09:10
  4. Problem with Release version
    By jlbrd in forum Installation and Deployment
    Replies: 7
    Last Post: 30th March 2006, 19:45
  5. Runtime dynamic linking + Qt4 problem
    By _Ramirez_ in forum Qt Programming
    Replies: 5
    Last Post: 11th February 2006, 14: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.