qt.conf (again) on windows
Hi, guys
I will deploy some applications in a USB stick, and I am planning to keep the Qt DLLs in a separate, common folder for all apps.
So, I'm planning to have a "qt.conf" with each executable, to make sure they will find the libraries.
I have read in the docs that, on a "qt.conf" file, the paths are relative to the directory containing the application executable, and this is perfect for a USB stick.
So, this file would be something like this:
Code:
[Paths]
Prefix=..\Qt
Binaries=bin
Plugins=plugins
The directory structure for, say, QtCore4.dll and qgif4.dll (one of the plugins) is as bellow, from the point of view of any of the apps:
..\Qt\bin\QtCore4.dll
..\Qt\plugins\imageformats\qgif4.dll
But when I start any of them from a "cmd" window prompt, in the executable direcory,the message "could not find QtCore4.dll" always pops up.
If I manually put the full path of the "bin" directory in the PATH variable (in this case, "K:\Qt\bin", and the app in "K:\pp\pp.exe"), it works.
What am i doing wrong?
Thanks
Francisco
Re: qt.conf (again) on windows
Nothing, the application requires the core libraries (such as QtCore4.dll) before it can parse the qt.conf file as the code to parse that file is in that library :)
What you need to do is what you have already tried - either adjust the path variable for the life of the application with a program loader or batch file, or put the DLLs in with the executable.
Another way would be to create "stubs", as in you have each application in it's own dir, the DLLs in another dir along with the application executable. One you run the stub, it will launch the main executable from the "bin" folder.
Re: qt.conf (again) on windows - SOLVED
Quote:
Originally Posted by
fatjuicymole
Nothing, the application requires the core libraries (such as QtCore4.dll) before it can parse the qt.conf file as the code to parse that file is in that library :)
What you need to do is what you have already tried - either adjust the path variable for the life of the application with a program loader or batch file, or put the DLLs in with the executable.
Another way would be to create "stubs", as in you have each application in it's own dir, the DLLs in another dir along with the application executable. One you run the stub, it will launch the main executable from the "bin" folder.
Thanks a lot, I should have be less desperate and think a little bit more, now that you pointed, it's obvious that QtCore4.dll must be found so that all other Qt start up events may take place.
Thanks again
Francisco