PDA

View Full Version : Dynamic qt libraries on a "clean" pc



giotto
10th March 2008, 16:46
hi guys,

I'd like to use my qt app. with dinamic libraries.
If the "clean" pc that doesn't have any qt libraries installed, then how should I attach the requested plugins / dlls?

I should put them in the app.'s folder or there is a qt library/plugin installer which can be used?
Actually I don't want to install the whole QT "SDK"...

thnx, giotto

bender86
10th March 2008, 17:55
On windows, just copy the Qt*4.dll to a directory in PATH variable (or in the same dir of executable). Then copy the %QTDIR%\plugins directory to the previous dir. Of course you can copy only libraries that you use, i.e. you can skip QtTest or libjpeg.
If you use mingw, you should copy also mingw10.dll (or what the name is), or if you use msvc, you should install vcredist.
On Mac I have no idea.

giotto
10th March 2008, 18:08
On windows, just copy the Qt*4.dll to a directory in PATH variable (or in the same dir of executable). Then copy the %QTDIR%\plugins directory to the previous dir. Of course you can copy only libraries that you use, i.e. you can skip QtTest or libjpeg.
If you use mingw, you should copy also mingw10.dll (or what the name is), or if you use msvc, you should install vcredist.
On Mac I have no idea.

hi,

I know this way, but is this the best way or there is a nicer solution?
This case this looks like a static linking with the possibility to use plugins.

BTW is there any way to define a subfolder for the dlls? I haven't found anything for that :(

giotto

brent99
11th March 2008, 04:01
There's a wiki here about static linking. It looks like a quick change to the Makefile plus some weird magic related to the mingw dll.

For dynamic, usually all you need is your app, QGui4.dll, QCore4.dll, and the mingw10 dll. If you use jpegs or gifs, you'll need to setup a plugin directory and copy the respective dlls from {}/QT/plugins to a "plugins" directory underneath your app. (I typed this from memory, so don't take me too literally here). Try to use PNG files instead.

giotto
11th March 2008, 12:20
There's a wiki here about static linking. It looks like a quick change to the Makefile plus some weird magic related to the mingw dll.

For dynamic, usually all you need is your app, QGui4.dll, QCore4.dll, and the mingw10 dll. If you use jpegs or gifs, you'll need to setup a plugin directory and copy the respective dlls from {}/QT/plugins to a "plugins" directory underneath your app. (I typed this from memory, so don't take me too literally here). Try to use PNG files instead.

I've read the wiki earlier than my first post.
This thread is not about static linking.
Who talked about PNG files?