I have developed an application in Qt and outside Qt Creator, when I run this application, it works. But when I use a batch-file to execute the application I get this error:
The application failed to start because it could not find or load the Qt platform plugin "Windows
I have included all the dll including platform/qwindows.dll, but I cannot understand what the problem is. Any idea what could be wrong?
Before, I thought that I have used an external library which is not set properly, but after removing the external library for testing purpose, the problem persists.
The contents of the batch files are:
@echo off
set VMT=\\serverName\DEV
set BC_VERSION=v1.0
echo Test release of BeamConfigurator %BC_VERSION%
set BC_HOMEDIR=%VISMT%\BeamConfigurator\%BC_VERSION%
set BC_BINDIR=%ABC_HOMEDIR%\bin
echo %BC_BINDIR%
start /WAIT /B /LOW %BC_BINDIR%\BeamConfigurator.exe
It looks like your executable is trying to access the hardcoded (which Qt Creator does) library paths. If you have copied all the
dllfiles required to run your executable to the same directory as your executable, try this.Create a file named
qt.confand place it in the same directory as your executable. Add the required stuff like this.More info can be found here