Setting up environment, deployment.
-
@KroMignon , sorry, the windeployqt is only used to create the install folder for systems that are not the development laptop, it was not used on this laptop.
However this is the issue I have, I can run the executable from Qt Creator but not in a command prompt.
-
@SPlatten said in Setting up environment, deployment.:
However this is the issue I have, I can run the executable from Qt Creator but not in a command prompt.
This is normal, Qt Creator will setup environment variable to point to shared libraries before starting application.
When starting from command prompt, you have to do it yourself. -
@SPlatten if you don't want to provide the dlls locally, than you have to add them to the path, preferably not the global one, but the local one in the command prompt
Take a look into the project settings in QtCreator check the build environment, check the path and compare it to the one set in the cmd prompt and append accordingly
-
@SPlatten said in Setting up environment, deployment.:
thank you, I thought that Qt Creator would have done that as part of the installation, obviously not.
There is not reason to change WINDOWS path.
Qt Creator will only update WINDOWS environment settings before starting the application. This is enough.By the way, why do you want to launch it from the build path and don't start it from QtCreator?
-
@SPlatten said in Setting up environment, deployment.:
@KroMignon , for testing purpose's, I'm sent the application to someone else to test and I wanted to be sure it would work locally outside of Qt Creator.
than use the deployment tool, thats what it is for :D
anyway inside your bin folder of your qt installation , there's a qtenv.bat if you execute that inside your cmd prompt, it should set up the environment correctly (locally)
-
@SPlatten said in Setting up environment, deployment.:
I wanted to be sure it would work locally outside of Qt Creator.
So you should try out the deployment result, not the build result ;)
You need to use windeployqt.exe or CQtDeployer.
-
@SPlatten said in Setting up environment, deployment.:
now your confusing me, as I said I'm trying to run it locally, the deployment tool as I've been told is not for local use.
I try to be more explicit:
- Qt libraries (and also MSVC libraries) are shared libraries. On Windows they need to be on application directory or accessible through PATH settings
- Qt also uses plugin (like graphic, sound, network, etc.) which needs to be locally or accessible via QT_PLUGIN_PATH
Because you could have many Qt Version installed on you development machine, it don't make sense to set add Qt libraires path into PATH environment. This will be done by QtCreator before starting application.
If you want to deploy the application, you have to used a deployment tool which will copy the required DLL.