[Solved]Error trying execute without QTCreator: Entry Point Not Found
-
wrote on 22 May 2015, 04:57 last edited by vinicius
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.dllWhat might be happening?
-
wrote on 22 May 2015, 06:36 last edited by
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. -
wrote on 22 May 2015, 12:00 last edited by vinicius
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? -
Hi @vinicius,
Do you have any Qt-related items in your PATH? If so, remove them. This is a common cause of crashes.
-
wrote on 22 May 2015, 16:53 last edited by
No, there are no QT in path.
-
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?@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,
- Run your .exe from C:\Qt\5.4\mingw491_32\bin
- 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
- The command would be something like
- Quit your .exe
- Run your .exe from the exe folder
- When the error message appears, run ListDLLs again.
- Compare your DLL list and see what's different.
-
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)?
-
@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,
- Run your .exe from C:\Qt\5.4\mingw491_32\bin
- 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
- The command would be something like
- Quit your .exe
- Run your .exe from the exe folder
- When the error message appears, run ListDLLs again.
- Compare your DLL list and see what's different.
wrote on 24 May 2015, 23:07 last edited byThank 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. -
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.wrote on 12 Mar 2021, 22:57 last edited by@vinicius Hi, I solved this by using the cmd
"D:\Qt\Qt5.8.0\5.8\mingw53_32\bin\windeployqt.exe test1.exe"
it automatically copy all the dependent dlls to the folder. some of the dlls are not indicated by the error messages. But it just works