[Solved]Error trying execute without QTCreator: Entry Point Not Found



  • I tried to copy all dlls to run my project out of QtCreator and received this message:
    The procedure entry point_cxa_throw_bad_array_new_length could not be located in the dynamic link library D:\Documents\build-TP-CALC2-Desktop_Qt_5_4_1_MinGW_32bit-Release\release\Qt5Core.dll

    What might be happening?



  • Hi, this error can occur if you copy the Qt5Core.dll (and the other DLLs) from the wrong place.
    I'm guessing you copied from C:\Qt\Tools\QtCreator\bin (which gives you that error). Instead, try copying from the C:\Qt\5.4\mingw491_32\bin directory.



  • I copied from C:\Qt\5.4\mingw491_32\bin.
    First I used the windeployqt. I thought it was a bug or something else and decided to copy manually. However, the same error has occurred.

    Edit:
    If I copy .exe to C:\Qt\5.4\mingw491_32\bin, its execute fine.
    If I copy dlls to .exe folder, its crashes.
    There are something wrong with my system configuration?


  • Moderators

    Hi @vinicius,

    Do you have any Qt-related items in your PATH? If so, remove them. This is a common cause of crashes.



  • No, there are no QT in path.


  • Moderators

    @vinicius said:

    If I copy .exe to C:\Qt\5.4\mingw491_32\bin, its execute fine.
    If I copy dlls to .exe folder, its crashes.

    That means your .exe grabbed the correct DLLs when you copied it into C:\Qt\5.4\mingw491_32\bin, but grabbed the wrong DLLs when you copied the DLLs into the .exe folder.

    Follow the steps at http://wiki.qt.io/Deploy_an_Application_on_Windows closely.

    If that still doesn't work,

    1. Run your .exe from C:\Qt\5.4\mingw491_32\bin
    2. While it's running, use the ListDLLs tool to see what DLLs it has loaded
      • The command would be something like ListDLLs.exe TP-CALC2 > log.txt
    3. Quit your .exe
    4. Run your .exe from the exe folder
    5. When the error message appears, run ListDLLs again.
    6. Compare your DLL list and see what's different.

  • Moderators

    bad_array_new_length is a symbol from the standard library, so I'm guessing you did not copy the compiler runtime libs (libstdc++-6.dll and libgcc_s_dw2-1.dll)?



  • Thank you all.
    I did like http://wiki.qt.io/Deploy_an_Application_on_Windows says: Copy all files and delete the unnecessary.
    I don't know what I was doing wrong, but now it worked.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.