views:

105

answers:

2

I have QT installed on disc D (on Windows). And I want to move it to disc C. Is it possible to do that?

If I just copy QT folder from C to D then I see lot of errors when I compile my applications that use QT. Errors are because qmake.exe contains full paths to include, bin and libs folders inside. So, when I create solution for Visual Studio 2005 using qmake - then this solution contains dependencies to old QT folder from disc D. And I found no way how to remove this dependencies without reinstalling of QT.

It is not a big problem for one my single machine - I can reinstall. But I need to deliver this change then to tens and hundreds of other developers machines and I want to make it as easy as possible without need to reinstall QT.

A: 

I guess re-compiling qmake will solve your problem.

alisami
Yes, recompiling qmake solves it. But it takes time to recompile. But probably it is the only way. Thanks.
Oleg
Compiling qmake does not take long time. Do not re-compile all of the qt libraries, only compile qmake.
alisami
+1  A: 

Check your %PATH%environment variable. You should have something like D:\qt\qt-4.5.3\bin in it. Just change it to your new path. Et voilà!

gregseth
No, it doesn't help because path to libs and includes are stored inside qmake.exe (it is very stupid, don't know why qmake developers did that). So, if I just change %PATH% then it helps to find qmake.exe but doesn't help to build projects generated with it.
Oleg
Even if you use the environment variable `%QTDIR%` ?
gregseth
Yes, qmake is using %QTDIR% only to find compiler specifications. But include and library path is hardcoded inside qmake...
Oleg