Qt-interest Archive, January 2008
Multiple development environments: How To on Mac and Windows ?
Pages: Prev | 1 | 2 | Next
Message 16 in thread
Dave Smith wrote:
> Dimitri wrote:
>>> On a Unix/Linux box, QTDIR drives everything. Change it and you can
>>> change which Qt version you are using.
>>
>> That's not true anymore in Qt 4. Even in Qt 3, QTDIR had been slowly
>> phased out.
>
>
> Does qmake just know where it is located, and then generate the
> appropriate paths in its Makefiles?
>
> --Dave
>
On Linux and Windows, which version of qmake that you run depends on
your $PATH environment variable. My approach on Linux is to put various
versions of Qt in separate directories (Qt-4.1.3, Qt-4.2.3, etc.), then
to create a link to the version I want to work with. My $PATH includes
Qt/bin so the correct version of qmake always runs.
--
[ signature omitted ]
Message 17 in thread
I think I have a final answer and I want to post it for the benefit
of others who may have the same question.
The answer is that QTDIR is the wrong way to select between multiple
versions as Qt 4.x ignores it. The paths to includes and libraries
are hard-coded into qmake when it is created and qmake drives
everything.
What I am going to try is setting up an (alias/link/shortcut) to each
version of qmake. I will post my results, good or bad, after I have
worked with this idea.
On Jan 12, 2008, at 12:32 PM, Dan White wrote:
> On a Unix/Linux box, QTDIR drives everything. Change it and you
> can change which Qt version you are using.
>
> I want to do that on both a Mac and a Windows-XP machine.
>
> How, please ?
>
> --
> To unsubscribe - send a mail to qt-interest-request@xxxxxxxxxxxxx
> with "unsubscribe" in the subject or the body.
> List archive and information: http://lists.trolltech.com/qt-interest/
>
--
[ signature omitted ]
Message 18 in thread
Here's what I do for this exact problem:
I have the sources in one directory, and all builds in a separate directory.
In the build directories, I call the correct qmake and let it set up there.
Here's an example of the directory setup:
myproject
- sources
- build-4.3
- build-4.4
sources just contain the svn checkout.
Starting up a build is done like this:
cd build-4.3
C:\Qt\4.3.3\bin\qmake.exe ..\sources\sources.pro
Same for build-4.4. qmake sets up all paths for your specific version, so
includes, paths, etc. will be correct.
This setup has one for me incredibly important feature: When I change some
code, I can just switch to the other build and test it out right away.
Another feature is that the sources directory is clean, meaning that all
generated files are put in the build dirs.
I do the same on Linux, but on Mac there is a bug in qmake that makes this
impossible :(
Bo.
On søndag den 13. Januar 2008, Dan White wrote:
> I think I have a final answer and I want to post it for the benefit
> of others who may have the same question.
>
> The answer is that QTDIR is the wrong way to select between multiple
> versions as Qt 4.x ignores it. The paths to includes and libraries
> are hard-coded into qmake when it is created and qmake drives
> everything.
>
> What I am going to try is setting up an (alias/link/shortcut) to each
> version of qmake. I will post my results, good or bad, after I have
> worked with this idea.
>
> On Jan 12, 2008, at 12:32 PM, Dan White wrote:
> > On a Unix/Linux box, QTDIR drives everything. Change it and you
> > can change which Qt version you are using.
> >
> > I want to do that on both a Mac and a Windows-XP machine.
> >
> > How, please ?
> >
> > --
> > To unsubscribe - send a mail to qt-interest-request@xxxxxxxxxxxxx
> > with "unsubscribe" in the subject or the body.
> > List archive and information: http://lists.trolltech.com/qt-interest/
>
> --
> To unsubscribe - send a mail to qt-interest-request@xxxxxxxxxxxxx with
> "unsubscribe" in the subject or the body. List archive and information:
> http://lists.trolltech.com/qt-interest/
--
[ signature omitted ]