PDA

View Full Version : Specify the DLL directory



Nyphel
27th April 2007, 12:14
Hello,

I would like ma application to be installed on a computer that hasn't Qt installed.

So, I could compile Qt in static mode, but errors occurs.
Other possibility is to join the Qt/MinGW DLLs with my application, and that's what I've done.

The matter is that I've to put the DLLs with my .exe, and I would prefer store them in other directory. But how could I say to my app that the DLLs aren't with the .exe file, but in other directory ?

Thanks for your help :)

jpn
27th April 2007, 12:21
The matter is that I've to put the DLLs with my .exe, and I would prefer store them in other directory. But how could I say to my app that the DLLs aren't with the .exe file, but in other directory ?
Any directory listed in PATH environment variable does the trick on Windows.

Nyphel
27th April 2007, 13:47
Yes, but the application will be installed on many computers and configurations, so I'm not sure that the path would be recorded :).

Moreover, I would like it to work correctly under Unix :(

So, there isn't other possibility ? I must copy the DLLs in the .exe directory ?

marcel
27th April 2007, 13:51
When you distribute your app you can copy the dll's in the app dir or in the system libraries dir ( system32 on win, /usr/lib on linux ). Mac is an exception - you have the choice of frameworks there, which will be included in the bundle.

Regards

Nyphel
27th April 2007, 14:14
So, if my app path is like :
c:/myapp/myapp.exe

Can I copy the DLLs in
c:/myapp/dll/

:confused:

marcel
27th April 2007, 14:26
No :).

Unless you load the library dynamically, you can't.
It has to be in the app dir. Look at other apps, for example...

Regards

Nyphel
27th April 2007, 14:29
Ok, thanks ;)