Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. No qmake in /bin /sbin /usr/bin /usr/sbin
QtWS25 Last Chance

No qmake in /bin /sbin /usr/bin /usr/sbin

Scheduled Pinned Locked Moved General and Desktop
15 Posts 3 Posters 17.8k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    DropDeadCreative
    wrote on last edited by
    #1

    Hi. My application compiles nicely via command line (I'm on OS X 10.4.11). However I cannot get it to build via Xcode due to the following errors in moc files:

    #error "This file was generated using the moc from 4.4.0. It"
    #error "cannot be used with the include files from this version of Qt."
    #error "(The moc has changed too much.)"

    So, I thought I would try and use qmake to create a new xcode project file via "qmake -spec macx-xcode project.pro" however it seems somehow I don't have qmake built or installed. Not sure how this happened, I've built QT 4.6.3 from the source.

    Anyway, can someone help me build & install Qmake? If it isn't obvious already, I'm a n00b.

    I've tried CD'ing into the QT source directory, then in the qmake folder and invoking "make" but it just laughs at me and says "make: *** No targets specified and no makefile found. Stop." There is a "Makefile.unix" in there, but I don't know what I'm doing.

    Any assistance is greatly appreciated! Thanks in advance.

    1 Reply Last reply
    0
    • A Offline
      A Offline
      anselmolsm
      wrote on last edited by
      #2

      Hi!

      After building Qt, qmake and other Qt tools should be in $DIR_WHERE_YOU_BUILT_QT/bin/ .

      To use it, you can either add this directory to your $PATH or install it - I am assuming the environment variable is called PATH on OS X too :-P

      Anselmo L. S. Melo (anselmolsm)

      1 Reply Last reply
      0
      • D Offline
        D Offline
        DropDeadCreative
        wrote on last edited by
        #3

        Hey there, thanks for the reply. Ok, so yes, I have qmake in /usr/local/Trolltech/Qt-4.6.3/bin but why then when I run "which qmake" do I get "no qmake in /bin /sbin /usr/bin /usr/sbin"?

        Thanks in advance.

        1 Reply Last reply
        0
        • D Offline
          D Offline
          DropDeadCreative
          wrote on last edited by
          #4

          Also, where would I define the path to qmake, in my .pro file or in my make file?

          $PATH=/usr/local/Trolltech/Qt-4.6.3/bin/qmake

          Thank you again

          1 Reply Last reply
          0
          • A Offline
            A Offline
            anselmolsm
            wrote on last edited by
            #5

            Hey

            well, the command which qmake looks for qmake in the directories listed in $PATH, so as /usr/local/Trolltech/Qt-4.6.3/bin is not in your $PATH variable, it can't find qmake.

            To add this path to your $PATH, do something like this:

            @
            export PATH=/usr/local/Trolltech/Qt-4.6.3/bin/qmake:$PATH
            @

            in a shell. I said 'something like this' because I don't know if it works in the same way on OS X and probably there is another place to set this variable globally for your system (so XCode would find qmake as well).

            Anselmo L. S. Melo (anselmolsm)

            1 Reply Last reply
            0
            • D Offline
              D Offline
              DropDeadCreative
              wrote on last edited by
              #6

              So I gave that a shot and entered "export PATH=/usr/local/Trolltech/Qt-4.6.3/bin/qmake:$PATH" into Terminal.

              Then following that I tried to find qmake again via "which qmake" I then got:

              no qmake in /usr/local/Trolltech/Qt-4.6.3/bin/qmake /bin /sbin /usr/bin /usr/sbin

              Your assistance is greatly appreciated.

              1 Reply Last reply
              0
              • A Offline
                A Offline
                anselmolsm
                wrote on last edited by
                #7

                Ops, I committed a mistake in my last post. You have to set the path to the directory where the binaries are located, so the correct would be:

                @
                export PATH=/usr/local/Trolltech/Qt-4.6.3/bin/:$PATH
                @

                Sorry about that. Now it may work correctly.

                Anselmo L. S. Melo (anselmolsm)

                1 Reply Last reply
                1
                • D Offline
                  D Offline
                  DropDeadCreative
                  wrote on last edited by
                  #8

                  Thank you! Working great now, really appreciate your help!

                  1 Reply Last reply
                  0
                  • D Offline
                    D Offline
                    DropDeadCreative
                    wrote on last edited by
                    #9

                    A new error has popped up now while trying to build via Xcode, my app builds fine via command line, the new error is:

                    @ cd /Developer/Project/ProjectSrc
                    /Developer/usr/bin/g++-4.0 -o /Developer/Project/ProjectSrc/.obj/Project.build/Release/Project.build/Objects-normal/i386/Project -L/Developer/Project/ProjectSrc/build/Release -L/usr/local/lib -L/usr/local/Trolltech/Qt-4.6.3/lib -L/usr/local/Trolltech/Qt-4.6.3/plugins/imageformats -L/Developer/FMOD\ Programmers\ API/api/lib -L/usr/local/Trolltech/Qt-4.6.3/plugins/imageformats -L/usr/local/Trolltech/Qt-4.6.3/lib -L/System/Library/Frameworks -F/Developer/Project/ProjectSrc/build/Release -filelist /Developer/Project/ProjectSrc/.obj/Project.build/Release/Project.build/Objects-normal/i386/Project.LinkFileList -lTagLib -lfmodex2 -lmp3lame.0 -lqjpeg -lqgif -lqmng -lqsvg -lqtiff -lqico -lQtXml -lQtGui -framework Carbon -framework AppKit -lQtCore -framework ApplicationServices -arch i386 -Wl,-Y,1455 -mmacosx-version-min=10.4 -headerpad_max_install_names -all_load -L/usr/local/lib -L/usr/local/Trolltech/Qt-4.6.3/lib -L/usr/local/Trolltech/Qt-4.6.3/plugins/imageformats -L/Developer/FMOD\ Programmers\ API/api/lib -L/usr/local/Trolltech/Qt-4.6.3/plugins/imageformats -L/usr/local/Trolltech/Qt-4.6.3/lib -lz -lm
                    /Developer/usr/bin/../libexec/gcc/i686-apple-darwin8/4.0.1/ld: Undefined symbols:
                    QSvgRenderer::load(QByteArray const&)
                    QSvgRenderer::render(QPainter*)
                    QSvgRenderer::QSvgRenderer(QObject*)
                    QSvgRenderer::isValid() const
                    QSvgRenderer::viewBox() const
                    /usr/local/Trolltech/Qt-4.6.3/plugins/imageformats/libqsvg.a(qsvgiohandler.o) reference to undefined QSvgRenderer::load(QByteArray const&)
                    /usr/local/Trolltech/Qt-4.6.3/plugins/imageformats/libqsvg.a(qsvgiohandler.o) reference to undefined QSvgRenderer::render(QPainter*)
                    /usr/local/Trolltech/Qt-4.6.3/plugins/imageformats/libqsvg.a(qsvgiohandler.o) reference to undefined QSvgRenderer::QSvgRenderer(QObject*)
                    /usr/local/Trolltech/Qt-4.6.3/plugins/imageformats/libqsvg.a(qsvgiohandler.o) reference to undefined QSvgRenderer::isValid() const
                    /usr/local/Trolltech/Qt-4.6.3/plugins/imageformats/libqsvg.a(qsvgiohandler.o) reference to undefined QSvgRenderer::viewBox() const
                    collect2: ld returned 1 exit status
                    collect2: ld returned 1 exit status
                    collect2: ld returned 1 exit status
                    collect2: ld returned 1 exit status
                    collect2: ld returned 1 exit status
                    collect2: ld returned 1 exit status
                    collect2: ld returned 1 exit status
                    collect2: ld returned 1 exit status
                    collect2: ld returned 1 exit status
                    collect2: ld returned 1 exit status
                    collect2: ld returned 1 exit status
                    collect2: ld returned 1 exit status
                    collect2: ld returned 1 exit status
                    collect2: ld returned 1 exit status@

                    Any thoughts on this? Again I appreciate your assistance!

                    1 Reply Last reply
                    0
                    • A Offline
                      A Offline
                      anselmolsm
                      wrote on last edited by
                      #10

                      Well, it seems you need to set your environment correctly to work with XCode. As I've never used XCode, the only things I can help you are the Mac stuff that the look like Linux stuff. So, try to adjust somewhere the variables LIBRARY_PATH (for the linker) and LD_LIBRARY_PATH (probably needed to run stuff correctly). If I am not wrong (again), you need add /usr/local/Trolltech/Qt-4.6.3/lib/ to both variables (set them in an analog way of what you did for PATH).

                      And let's see if someone who knows XCode and these OS X things can help too :-)

                      Anselmo L. S. Melo (anselmolsm)

                      1 Reply Last reply
                      0
                      • G Offline
                        G Offline
                        goetz
                        wrote on last edited by
                        #11

                        Did you add

                        @
                        QT += svg
                        @

                        to your .pro file?

                        For the PATH variable: If you add the line to the file .bashrc in your user directory (/Users/<username>) it is executed each time you open a terminal window.

                        http://www.catb.org/~esr/faqs/smart-questions.html

                        1 Reply Last reply
                        0
                        • D Offline
                          D Offline
                          DropDeadCreative
                          wrote on last edited by
                          #12

                          In my .pro file I have:

                          @QTPLUGIN += qjpeg qgif qmng qsvg qtiff qico@

                          Which should cover that, right?

                          1 Reply Last reply
                          0
                          • G Offline
                            G Offline
                            goetz
                            wrote on last edited by
                            #13

                            Not really. The SVG support changed, as far as I remember. There is a Qt SVG module, that you can enable with adding "svg" to the QT variable (not QTPLUGIN). That adds the QtSvg.framework to the libs linked to your program and should solve the linking problem.

                            http://www.catb.org/~esr/faqs/smart-questions.html

                            1 Reply Last reply
                            0
                            • D Offline
                              D Offline
                              DropDeadCreative
                              wrote on last edited by
                              #14

                              Thank you, this solved my errors.

                              1 Reply Last reply
                              0
                              • G Offline
                                G Offline
                                goetz
                                wrote on last edited by
                                #15

                                No problem, you're welcome. I once struggled over this, too.

                                http://www.catb.org/~esr/faqs/smart-questions.html

                                1 Reply Last reply
                                0

                                • Login

                                • Login or register to search.
                                • First post
                                  Last post
                                0
                                • Categories
                                • Recent
                                • Tags
                                • Popular
                                • Users
                                • Groups
                                • Search
                                • Get Qt Extensions
                                • Unsolved