Unsolved QProcess : "Unknown error" when exitCode() != 0
-
hi @dheerendra ,
When i compile my program there are no error it's only my QMessageBox in main. -
@Julie said in QProcess : "Unknown error" when exitCode() != 0:
cygwin
Does it depend on any external dlls ?
Also, if you run roi.exe in a cmd with same parameters, it does work?
-
@mrjj , I always add dll and yes before new installation of windows it works. (all my project)
-
Maybe it's important :
now i compile with release but if i compile with debug i've an other problem :
-
Hi
When you run it in Creator it complains about missing platform ?
Then you have a patch issue or installation issue.
It should not happen as Creator setup where the app gets it Qt dlls from. -
Hi @mrjj
sorry i don't understant your advise.
Here it's my folder with dll :
and here my .por file :
-
Ok, it seems you try to run it OUTSIDE craetor ?
in a deployment folder ?if yes, please see this
http://www.tripleboot.org/?p=138
you need a subfolder called platforms
-
@mrjj ,
oh no i run it with my IDE Qt creator.
But i try to follow your link. -
@Julie
STOPBut when run for creator , no Qt dlls should be copied to the build folder.
This is not normal.only foreign dlls like opencv and cyg stuff
Also u also include dlls with D in the end its for debug, but its a release folder.
So i think you somehow made a mess. :)Its very unclear what you are doing.
Deplyment folder (the link) is for other computers. Not running via creator
You dont need it to run via creator.
So since you copied Qt DLLS to build folder, something seems not right for me. -
Hi
Please try
Select Projects, Run Settings, expand the Run Environment, and modify the PATH variable to include the folders for any extra dlls you need. opencv and cyg*
its explained in details in the manual. -
My computer had a problem and I reinstalled windows.
Before my program works but now no.
I only make "open project" in new intallation of Qt.For the dll with "d" i know i see it in other topic. I try to change it but it worked less after.
I add manually the dll and the .exe under the "build-ProjetStage-Desktop_Qt_5_9_1_MinGW_32bit-Release\release" folder.
I read your link
-
ok, i guess it just need some paths then.
if same code used to work.You really should make new default GUI project and see that runs.
Else something very wrong with your Qt installation. -
@mrjj If you know a better/clean method I love to know it.
-
Well put into the environment creator uses when u press run
Select Projects, Run Settings, expand the Run Environment.
here u can add paths to dlss and they are found when run. -
@mrjj
I create a new project and i add variables after variables and method after method.
For the moment it's works. (but images are'nt visible now ;( )
I'm going to add the first external .exe.
You think i add it with "Select Projects, Run Settings, expand the Run Environment." ?I really want to say to you thanks for your help.
-
Its hard to say what went bad after you reinstalled windows.
Maybe it had the right paths back then and Creator took them when you installed Qt.
Im not sure about why it stopped working.- but images are'nt visible now
What images ?
You are very welcome. i hope you get it to run again.
-
I whant to deploying this project before the end of my job (Friday).
I understant i must run with "release" and not "debug".
I understant i must add my dll at "Select Projects, Run Settings, expand the Run Environment".But outside Qt Creator it's like my dlls arn't add :
At the end i want deployed my application in static (i thinks it's better no ?)
I whant it woks on windows and linux and the image on button it's visible (i use qrc ressources before it's works (again ^^) and know no). -
hi
Please STOP a moment
you are mixing stuff up, or i really do not understand what you are doing :)1: running in creator.
You need to add any dlls that is not part of the Qt so when Creator runs the app, it can find those extra dlls.
That is the "expand the Run Environment" part. ( to PATH )
There should be no need to add any Qt dlls for that.
Setting ANYTHING here have no effect on deployment what so ever.2: Deployment
Running the app on another computer with no Qt installed.
For that you need the deploy folder with the right subfolders and
all extra Dlls and the Qt ones you need.
There is a tool call windeployqt
http://doc.qt.io/qt-5/windows-deployment.html
that can help copy the right QT dlls to the folder.This deployment folder, you then give to others and they can run the application.
For more info about the deployment folder, i like this site alot
http://www.tripleboot.org/?p=138And AGAIN, deployment and running in Creator is 2 VERY different things.