Re: How to set paths?

Originally Posted by
hoborg
So this is pointless because I installed Qt 4 to develop applications in this enviroment... let's say it that way: I want to get rid of qt 3 and I want my newly installed qt 4 to stay as The-Chosen-One ;)
Could you tell me how to do this?
p.s. I just noticed the 'installation' section so this thread is in kinda wrong place, sorry for that...
Once the program you are trying to build is installed, you can set the variables back to point to Qt4. They will only need them while compiling. I had this problem with a few KDE programs recently because they wanted to use the qt tools from Qt3, which I deleted shortly after installing Qt4.
My ~/.profile looks something like this:
#QMAKESPEC=/usr/local/share/Qt/mkspecs/freebsd-g++; export
QMAKESPEC=/usr/local/Trolltech/Qt-4.1.0/mkspecs/freebsd-g++; export QMAKESPEC
#QTDIR=/usr/X11R6; export QTDIR
QTDIR=/usr/local/Trolltech/Qt-4.1.0; export QTDIR
PATH=$PATH:$QTDIR/bin
The commented out lines are the Qt3 locations. That way if I need to install something that uses Qt3, I can quickly comment out the second version and uncomment the first, login on another terminal, and then after it's done I can change everything back. It's probably not a good idea to get rid of your Qt3 distribution entirely until all of the programs you like to use switch over to 4. Unless of course you can't spare the space.
Of course, if you only ever plan to program while in X, you can just get away with putting the lines in .bashrc (if you use bash) and reopening your Konsole/xterm/whatever session. I have these lines in my wife's .bashrc file because sometimes she's downloading something with BitTorrent so I can't log her out to work and have to use an xterm :(
But note that they won't work when you close X, because afaik .bashrc is only used by non-login instances of the shell. Well, I guess you could get it to work outside of X, but you know what I mean.
btw I just noticed I am no longer "Junior Member." Hooray! :D :D
Last edited by michel; 21st February 2006 at 23:25.
My philosophy is: If you can use a free, open-source alternative: do it. And if you can't, pretend it's free and open-source and hope you don't get caught.
Bookmarks