Announcement

Collapse
No announcement yet.

How to get qt to work?

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    How to get qt to work?

    Hi i have installed qt4 but i cant get it to work.
    When i run qmake on a project i get the makefile but then when i run make
    it dont find the qt rellated classes.
    I understand that it has something to do with the environment variables for qt but I dont know where to
    put them.
    I found on qt's homepage that I should put some environment variables in the .profile but i cant find it?
    Is this the same as the .bashrc file in my home dir?
    I found a profile file in /etc/ but it was't hidden?
    But I did find a .profile file in the /root dir and it look some thing like the /etc/profile file.

    Do you have any ideas what i should do?

    #2
    Re: How to get qt to work?

    I created a .profile file and added the environment variables I run it with bash and the echo $PATH
    the dir was added to the environment variable PATH but i still cant get it to work after I have run qmake and then make I get error messages like
    finddialog.cpp:53: error: ‘QString’ was not declared in this scope

    Comment


      #3
      Re: How to get qt to work?

      Your ".profile" file is actually called ".bash_profile" and it is in your home directory. For the rest, look at this thread. ShOcKwAvE explains what you have to do.

      Comment


        #4
        Re: How to get qt to work?

        Thanks for your replay i followed the thread but now I get

        ..
        ...
        QtCore_debug -lpthread
        /usr/bin/ld: cannot find -lQtGui_debug
        collect2: ld returned 1 exit status
        make: *** [find] Error 1

        Do you have any idea what this means?

        Comment


          #5
          Re: How to get qt to work?

          It means that the linker couldn't find the library libQtGui_debug. You should be able to use the "locate" or "find" commands to find it.

          Comment


            #6
            Re: How to get qt to work?

            Thanks I managed to get it to work!
            I did as it was posted in the thread above.
            But I will write it down any way, first of all I was not interested in having Qt3 and Qt4 so I removed Qt3 you dont have to do this but you have to create a alias since /usr/bin/qmake points to /etc/alternatives/qmake and that in turn points to /usr/bin/qmake-qt3. Create the alias by run following

            sudo ln -sf /usr/bin/qmake-qt4 /usr/bin/qmake

            But if you like to be able to run qmake-qt3 still do following

            sudo ln -sf /usr/bin/qmake-qt4 /usr/bin/qt4make

            move to /usr/bin and run ls -l q* you should get something like this

            lrwxrwxrwx 1 root root 23 2006-10-11 23:04 qmake -> /etc/alternatives/qmake
            -rwxr-xr-x 1 root root 1940636 2006-05-12 18:07 qmake-qt4
            -rwxr-xr-x 1 root root 30680 2006-05-18 17:09 qobexclient
            -rwxr-xr-x 1 root root 4128 2006-02-06 20:27 qrttoppm
            -rwxr-xr-x 1 root root 1034720 2006-05-12 18:07 qt3to4
            lrwxrwxrwx 1 root root 18 2006-10-11 23:24 qt4make -> /usr/bin/qmake-qt4
            lrwxrwxrwx 1 root root 26 2006-10-11 18:58 qtconfig -> /etc/alternatives/qtconfig
            -rwxr-xr-x 1 root root 217640 2006-05-12 18:07 qtconfig-qt4
            -rwxr-xr-x 1 root root 669 2006-05-24 11:39 qtdoc
            -rwxr-xr-x 1 root root 405 2006-08-03 12:59 qt-language-selector
            -rwxr-xr-x 1 root root 7989 2006-01-16 11:42 querybts

            Comment

            Working...
            X