The code executable cannot continue: libgcc_s_seh-1.dll was not found - qt

I have a problem that I cannot solve, When I run the executable of my program it gives me the following error:
The code executable cannot continue because libgcc_s_seh-1.dll was not found. To fix the problem, try reinstalling the program
I tried to manually copy and paste the file (libgcc_s_seh-1.dll) into the folder where I keep the executable but I get the following error:
The application could not be started correctly (0xc000007b)
Additional information:
I use windows 10 64 bit
I Use mingw81_64
I use version 6.1.2 of Qt
What can I solve the problem?

I guess you double-clicked in exe file that provides after building in release mode :
For Deploy and create Exe output with QT in windows you should follow this way:
put your compiler path in your system path. now you use mingw81_64 you should set it. something like Qt/tools/mingw81_64/bin
copy exe file that provides after building in release mode in one folder and run mingw81_64 cmd (it has separate cmd)
and cd to that folder path
windeployqt app.exe
This command will get all dll needs for your app and your exe will work .
if you use qml
windeployqt --qmldir (the path of its directory ) app.exe
and also see these youtube videos for more info:
https://www.youtube.com/watch?v=LdSTgR0xJco
https://www.youtube.com/watch?v=hCXAgB6y8eA

For specific error of libgcc_s_seh-1.dll was not found, please try to copy libgcc_s_seh-1.dll, libstdc++-6.dll, libwinpthread-1.dll into your compiler path like Qt/tools/mingw81_64/bin.

You should copy libgcc_s_seh-1.dll, libstdc++-6.dll, libwinpthread-1.dll into your exefile path after executing windeployqt.exe with all files are in correct version.

Related

Can not load library Qt5Widgets.dll

Error when run FBLTool_0224.exe
I guess you double-clicked in exe file that provides after building in release mode :
For Deploy and create Exe output with QT in windows you should follow this way:
put your compiler path in your system path. now you use mingw81_64 you should set it. something like Qt/tools/mingw81_64/bin
copy exe file that provides after building in release mode in one folder and run mingw81_64 cmd (it has separate cmd)
and cd to that folder path
windeployqt app.exe
This command will get all dll needs for your app and your exe will work .
if you use qml
windeployqt --qmldir (the path of its directory ) app.exe
and also see these youtube videos for more info:
https://www.youtube.com/watch?v=LdSTgR0xJco
https://www.youtube.com/watch?v=hCXAgB6y8eA
installing visual C++ 2010 runtime x86 solved problem

error while execution of qt .exe file using windeployqt

I have a problem with my qt deployment under windows 10. I'm using QtCreator 4.5.1 and Qt 5.11 on Windows 10. I execute my application in release mode. Then I open the command line by running Qt5.11.0 for Desktop(MinGw 5.3.0 32 bit). There I give the path of the release folder (where my exe file exists):
C:\Qt\workspace\build-CanSaveLog2FilterError2DataExploreClass6-Desktop_Qt_5_11_0_MinGW_32bit2-Release\release
After that I type this line:
windeployqt.exe --quick .
and all the necessary .dll files and platforms and plugins will be generated.
When I do this to a simple qt project, it works fine and my exe file can be executed correctly. Whereas when I do the same to my desired project, I can't execute my exe file and I get this error:
This application failed to start because it could not load the Qt platform plugin "windows"
in "", even though it was found. This is usually due to missing dependencies which you can find by setting the env variable QT_DEBUG_PLUGINS to 1.
Available platform plugins are: windows.
Reinstalling the application may fix this problem.
I tried to find dll file by executing it in dependency walker. When I did this, it showed a lot of dll files missing such as "API-MS-WIN-EVENTING-CONTROLLER-L1-1-0.DLL" which doesn't exist even in bin folder of mingw. While if I put the exe file in the bin folder of mingw it works fine.
So I tried to find all the main dll files whose their sub dll files were missing and copied them to the release folder. For example for API-MS-WIN-EVENTING-CONTROLLER-L1-1-0.DLL, I copied Qt5core.DLL to the release folder. But it didn't work again.
I can't understand where the problem is. Could you please help me to resolve it? Since yesterday morning I'm searching and can't find the solution.

Qt deployment for windows copies incorrect dll for mingw

I set this build step to add deployment DLLs to my release folder:
Command: %{Qt:QT_INSTALL_BINS}/windeployqt.exe
Arguments: "%{CurrentProject:NativePath}\bin\server.exe" --no-translations
The correct QtXXXX.dll files are copied, but incorrect libstdc++-6.dll is added. The correct one is located at QTDIR/bin/libstdc++-6.dll, but instead, windeployqt.exe copies this DLL file from C:\MinGW\bin. If I try to run the application, I get this error:
How can I tell windeployqt.exe to copy mingw files from %{Qt:QT_INSTALL_BINS} instead of my MinGW installation folder?
The version of Qt I am using is Qt5.6.0-MinGW with mingw49_32.
If you don't use the batch file that sets up the environment and comes with Qt then just make sure that the first compiler g++.exe found be windeployqt.exe is the one coming with Qt and not the one that got installed with MinGW. This way the correct library will get copied.
As an example from my own current installation:
Qt is installed to C:\Qt\Qt5.8.0 and MinGW to C:\MinGW. Hence I add C:\Qt\Qt5.8.0\Tools\mingw530_32\bin before C:\MinGW\bin to my PATH. These two paths each contain a compiler g++.exe.

Build Qt projects using static build

I have created a program in Qt using Qt Creator. When I open it, the message appears "The program can't start because Qt5Cored.dll and Qt5widgetsx.dll is missing from your computer. Try reinstalling the program to fix this problem."
copy required libraries from you Qt installation to the directory of executable.
Have you really got a static compiled version of Qt? and are you statically compiling your project?... if so your output executable will be around 30-40mb.... and it won't be asking you for dlls.
However it looks like you have a dynamically linked output, in which case you need to find all the DLLs that your projects uses. You can get these from the folder:
<installpath>\Qt\5.5\mingw492_32\bin for example (different if you use linux / msvc)
Keep running the program and grab each dll it complains about... or use somthing like dependency walker (a free executable you can find online) to help determine which DLLs you need.
You probably need (For windows, using mingw):
Qt5Widgets.dll
Qt5Gui.dll
Qt5Core.dll
libwinpthread-1.dll
libstdc++-6.dll
libgcc_s_dw2-1.dll
Or the debug version in your case which end in "d" e.g.: Qt5Core.dll (release), Qt5Cored.dll (debug). Note versions may be different for your installation version. Copy these files next to your executable. OR include <installpath>\Qt\5.5\mingw492_32\bin in your path.
You need to add all the required dlls
C:\Qt\5.2.1\mingw48_32\bin\
to your project. https://forum.qt.io/topic/50705/solved-qt3d-executable-error-qt5cored-dll-is-missing-from-your-computer/2 should solve your problem.

cannot seem to run my jar file in command promtp

I have created a project within NetBeans with includes a form and a class that serves as a database connection layer. When i try to run this project through the IDE everything launches just fine. The problem occurs when i try to launch the jar file created by the ide on the commmand prompt terminal. nothing happens? it just moves to the next line. i have a manifest file with a class path and main class specified and it looks like so
Manifest-Version: 1.0
Ant-Version: Apache Ant 1.8.3
Created-By: 1.6.0_22-b04 (Sun Microsystems Inc.)
Class-Path: lib/mysql-connector-java-5.1.13-bin.jar lib/mylib.jar
X-COMMENT: Main-Class will be added automatically by build
Main-Class: eopprototype.EOPPrototype
when i look at what the compiler says is says To run this application from the command line without Ant, try:
java -jar "/h/USERS/local/pagola/NetBeansProjects/EOPPrototype/dist/EOPPrototype.jar"
when i try to type that command it just goes to the second line without anything happening. Not evena ny errors. I am supposed to distribute this jar file to a shared folder and have it run but i cant do it and i dont know whats wrong. I have NOT added any JAVA_HOME path as my jdk 1,6 is isntalled in usr/bin so it should find it there but i have NOT added any classpath (ide shows two runtime and bootable classpaths) somebody please assist me as i am new to the whole java virtual machine environment
I guess you meant the standard outputs, or other things you printed to the command prompt from your java program. To get that printed on the command propmt, you need to run java in debug mode.
Use
java -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5005 -jar myJar.jar
to run java in debug mode and get all standard outputs, exceptions etc. on the command prompt.

Resources