Results 1 to 12 of 12

Thread: How to set paths?

  1. #1
    Join Date
    Feb 2006
    Location
    Lublin, Poland
    Posts
    11
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default How to set paths?

    Hi, I just downloaded the source of qt-4.1.0 for my X11.
    After that, I compiled it with make && make install. The new installation is now in /usr/local/Trolltech/Qt-4.1.0/ but there is still qt 3.3 remaining in /usr/local/qt/3/
    I tried to change PATH and other variables in /etc/env.d but I just got stuck, is there no way to do it automatically?

  2. #2
    Join Date
    Jan 2006
    Location
    Athens - Greece
    Posts
    219
    Thanks
    3
    Thanked 1 Time in 1 Post
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: How to set paths?

    export PATH=/usr/local/Trolltech/Qt-4.1.0/bin:$PATH
    export QTDIR=/usr/local/Trolltech/Qt-4.1.0

    You can also add the two lines above in your /etc/profile

  3. #3
    Join Date
    Feb 2006
    Location
    Lublin, Poland
    Posts
    11
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: How to set paths?

    Thanks, I did that, but I think that I there is something more messed up.
    After I downloaded, for example k3b (cd/dvd burning software) sources and launched the ./configure, I get something like this:

    checking for Qt... configure: error: Qt (>= Qt 3.0.3) (headers and libraries) not found. Please check your installation!

  4. #4
    Join Date
    Jan 2006
    Location
    Athens - Greece
    Posts
    219
    Thanks
    3
    Thanked 1 Time in 1 Post
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: How to set paths?

    Then revert back to your original Qt installation:
    echo $PATH
    echo $QTDIR
    and then post your results. k3b is written in Qt 3 so you shouldn't have the path to the Qt 4 installation in front/before your Qt 3 installation in your PATH env var and QTDIR should point to your Qt 3 installation as well.

  5. #5
    Join Date
    Feb 2006
    Location
    Lublin, Poland
    Posts
    11
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: How to set paths?

    Fine, I could install k3b then but when I set the paths back to qt 3, the 'qmake' command would point to the older version of qmake, am I right?

  6. #6
    Join Date
    Jan 2006
    Location
    Athens - Greece
    Posts
    219
    Thanks
    3
    Thanked 1 Time in 1 Post
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: How to set paths?

    Quote Originally Posted by hoborg
    Fine, I could install k3b then but when I set the paths back to qt 3, the 'qmake' command would point to the older version of qmake, am I right?
    That's right

  7. #7
    Join Date
    Feb 2006
    Location
    Lublin, Poland
    Posts
    11
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: How to set paths?

    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...

  8. #8
    Join Date
    Feb 2006
    Location
    Österreich
    Posts
    35
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Default Re: How to set paths?

    Quote 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.

  9. #9
    Join Date
    Feb 2006
    Location
    Lublin, Poland
    Posts
    11
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: How to set paths?

    Ok, everything works fine. I also had to take care of the LDPATH but it's ok now. Thanks a lot :)

  10. #10
    Join Date
    Jan 2006
    Location
    Riverside, Rhode Island, USA
    Posts
    245
    Thanks
    52
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Default Re: How to set paths?

    Hi michel
    I am try to do as you suggest
    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
    But I can't find where this profile is. I did a "find Files/Folders" search on "*.profile*" and got a whole bunch, but none of them looked like yours. I think I have installed Qt4 correctlly. i have "Qt-4.1.1" in my "usr/local/Trolltect" directory and all the examples and demos run ok', but I can't compile any of them as you can see.
    pete@newCompaq:~/qt4/analogClock$ qmake -project
    pete@newCompaq:~/qt4/analogClock$ qmake analogclock.pro
    Error processing project file: /home/pete/qt4/analogClock/analogclock.pro
    pete@newCompaq:~/qt4/analogClock$
    Any suggestion?
    thanks
    pete

  11. #11
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: How to set paths?

    Quote Originally Posted by impeteperry
    pete@newCompaq:~/qt4/analogClock$ qmake -project
    pete@newCompaq:~/qt4/analogClock$ qmake analogclock.pro
    Error processing project file: /home/pete/qt4/analogClock/analogclock.pro
    Any suggestion?
    Have you tried "qmake" or "qmake analogClock.pro"?

  12. #12
    Join Date
    Jan 2006
    Location
    Athens - Greece
    Posts
    219
    Thanks
    3
    Thanked 1 Time in 1 Post
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: How to set paths?

    Quote Originally Posted by impeteperry
    ...But I can't find where this profile is...
    It's in /etc/profile. Take a look at the end of the script to see what else it runs (in Suse you should put your changes in /etc/profile.local for example)
    Quote Originally Posted by impeteperry
    ...I can't compile any of them as you can see...
    Any suggestion?
    jacek has a good one

Similar Threads

  1. qt_plugins_3.3rc auto-generated with embedded paths
    By kevinm in forum Installation and Deployment
    Replies: 0
    Last Post: 20th October 2008, 16:22
  2. pass code from .pro file through to Makefile in qmake?
    By rholsen in forum Qt Programming
    Replies: 2
    Last Post: 16th October 2008, 18:51
  3. include paths
    By altec in forum Installation and Deployment
    Replies: 0
    Last Post: 8th August 2008, 11:59
  4. Problems with paths
    By zorro68 in forum Installation and Deployment
    Replies: 1
    Last Post: 13th July 2008, 11:20
  5. qmake and visual studio paths
    By SiLiZiUMM in forum Installation and Deployment
    Replies: 1
    Last Post: 12th March 2008, 07:18

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.