[Qt-interest] Switching Qt Installation
Frank Neuhaus
dtag00 at gmail.com
Tue Oct 13 17:03:27 CEST 2009
On Tue, Oct 13, 2009 at 12:05 PM, Andreas Pakulat <apaku at gmx.de> wrote:
> On 13.10.09 11:45:44, Frank Neuhaus wrote:
>> On Tue, Oct 13, 2009 at 11:04 AM, Stephen Jackson <spjackson42 at gmail.com> wrote:
>> > On Mon, Oct 12, 2009 at 8:41 AM, Frank Neuhaus wrote:
>> >> I installed Qt 4.5.2. with my Linux Distribution (Fedora)'s packet
>> >> manager. Now I want to compile the latest git version of Qt creator,
>> >> which unfortunately requires 4.6.0. I downloaded the 4.6.0 tech
>> >> preview edition, compiled and installed it. It installed into
>> >> /usr/local/Trolltech/Qt-4.6.0-tp1/.
>> >> The problem is that even when explicitly calling
>> >> /usr/local/Trolltech/Qt-4.6.0-tp1/bin/qmake, qmake generates Makefiles
>> >> that include /usr/include/QtSomething, which obviously belong to my
>> >> old Qt 4.5.2 installation. Environment variables such as QTDIR appear
>> >> to be ignored.
>> >> How can I tempoarily change my installation to 4.6.0 to compile Qt creator?
>> >>
>> >
>> > I haven't used 4.6 or tried to compile Qt Creator. However, specifying
>> > the path to qmake (or setting PATH) is all I need to do to switch
>> > between Qt versions for building application code. As I understand it,
>> > that is all you are supposed to do.
>> >
>> > If that isn't working for you (as you indicate above), I suggest that
>> > you check whether this is something specific to building Qt Creator,
>> > and also whether you have any environment variables pointing at
>> > /usr/include/QtSomething. Do you run "configure" for building Qt
>> > Creator? Is that where it is going wrong?
>> >
>> > I hope this gives you some clues.
>>
>> I believe the problem is not specific to Qt Creator. Its a "standard
>> Qt program", i.e. it doesn't require configure or anything. Just qmake
>> followed by make suffices.
>> What do you mean with specifying the path to qmake? My /usr/bin
>> contains a symbolic link to my 4.5.2 qmake... Even when i exchange
>> that link by a link to the 4.6 qmake, it does not work. That is - the
>> proper qmake is called when I type qmake (checked that with qmake -v),
>> but it keeps using the include directories in /usr/include/QtGui and
>> so on. I can see that when I type make and I look at the actual
>> compiler calls - they contain -I/usr/include/QtGui etc.
>>
>> How does qmake determine which include directories to use?
>
> Its compiled into the binary. You can see the path it'll use by simply
> running qmake -query. These paths can be adjusted by qt.conf file with a
> specific format in QT_INSTALL_PREFIX.
Thanks. I got it working. After veryfying that my qmake was correct
with qmake -query, i attempted to do a qmake -r, which recursively
called the _proper_ qmake for all .pro files. That fixed it :-)
Thanks
Frank
More information about the Qt-interest-old
mailing list