[Qt-creator] Change path to external DLLs for program execution

André Hartmann andre.hartmann at iseg-hv.de
Wed Apr 16 15:03:45 CEST 2014


Hello,

I have (Windows) projects that depends on external
libraries.

Whenever a new version of this lib is released,
I have to compile and test the projects against
the new version and sometimes switch back to the
old version.

Qmake already makes my life very easy, as I can
switch between them by changing the CONFIG variable:

# project.pro

CONFIG += LIB_V1
#CONFIG += LIB_V2

LIB_V1 {
	INCLUDEPATH += "c:/lib_v1/include"
	QMAKE_LIBDIR += "c:/lib_v1/lib"
}

LIB_V2 {
	INCLUDEPATH += "c:/lib_v2/include"
	QMAKE_LIBDIR += "c:/lib_v2/lib"
}

Now my last problem is, that I need the corresponding
DLLs from either c:/lib_v1/bin or c:/lib_v2/bin when
executing my program from Qt Creator.

Is there a way to achive this?

The worst possible way would be to copy the DLLs to the
build directory in a build step, but maybe there is a
cleaner solution?

Best regards,
Andre



More information about the Qt-creator mailing list