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. Install Qt5 from Git on Mac OS X Mountain Lion
Forum Updated to NodeBB v4.3 + New Features

Install Qt5 from Git on Mac OS X Mountain Lion

Scheduled Pinned Locked Moved General and Desktop
4 Posts 2 Posters 4.7k Views 1 Watching
  • 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.
  • B Offline
    B Offline
    beemaster
    wrote on last edited by
    #1

    Hello,

    I have the following problem, I can't install Qt5 properly on my Mac. What I do:

    @
    mkdir qt5
    cd qt5
    git clone git://gitorious.org/qt/qtbase.git
    cd qtbase
    ./configure -prefix $HOME/development/macosx/qt5 -nomake docs -nomake examples -nomake demos -nomake tests -opensource -confirm-license -release -no-c++11
    make -s -j5
    @

    At this point everything is fine, Qt5 is configured for building.

    @
    make -s -j5
    @

    Qt5 builds fine!

    @
    make install
    @

    Now libraries are copied to installation folder, which I specified via -prefix when configuring

    I set up my environment

    @
    export PATH=$HOME/development/macosx/qt5/bin:$PATH
    @

    Create simple project:
    @
    mkdir test
    cd test
    touch test.pro
    open -e test.pro
    @

    Put this in pro file:

    @
    TEMPLATE = app
    QT += core

    SOURCES += test.cpp
    @

    Now create cpp file:

    @
    touch test.cpp
    open -e test.cpp
    @

    Put this in:

    @
    #include <QVector>

    int main()
    {
    return 0;
    }
    @

    Try to compile:

    @
    qmake
    make
    @

    Get the following error:

    @
    clang++ -c -pipe -mmacosx-version-min=10.6 -O2 -Wall -W -fPIE -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -I../../macosx/qt5/mkspecs/macx-clang -I. -I../../macosx/qt5/include -I/Users/romanp/development/macosx/qt5/include/QtGui -I../../macosx/qt5/lib/QtGui.framework/Versions/5/Headers -I../../macosx/qt5/include/QtCore -I../../macosx/qt5/lib/QtCore.framework/Versions/5/Headers -I. -I/System/Library/Frameworks/OpenGL.framework/Versions/A/Headers -I/System/Library/Frameworks/AGL.framework/Headers -o main.o main.cpp
    In file included from main.cpp:1:
    In file included from ../../macosx/qt5/lib/QtCore.framework/Versions/5/Headers/QVector:1:
    ../../macosx/qt5/lib/QtCore.framework/Versions/5/Headers/qvector.h:45:10: fatal error:
    'QtCore/qalgorithms.h' file not found
    #include <QtCore/qalgorithms.h>
    ^
    @

    If I change #include <QVector> to #include <QtCore/QVector> I get the error even earlier:

    @
    main.cpp:1:10: fatal error: 'QtCore/QVector' file not found
    #include <QtCore/QVector>
    ^
    @

    Does anyone experience this problem? How to solve it?
    Thanks!

    1 Reply Last reply
    0
    • sierdzioS Offline
      sierdzioS Offline
      sierdzio
      Moderators
      wrote on last edited by
      #2

      There is no need for "make install" when you are using prefix. But that is probably not the cause of this error.

      Have you verified that those includes are there? try running it with:
      @
      qmake -spec macx-llvm
      make
      @

      (Z(:^

      1 Reply Last reply
      0
      • B Offline
        B Offline
        beemaster
        wrote on last edited by
        #3

        Actually I think you need to "make install", I verified that. Before I type "make install", I don't have anything in my installation folder. When I type "make install", libs are copied there.

        I tried "qmake -spec macs-llvm && make", but this resulted in a whole bunch of errors. Also it tries to use g++ compiler, and I compiled Qt5 with clang... So I need to use clang

        1 Reply Last reply
        0
        • B Offline
          B Offline
          beemaster
          wrote on last edited by
          #4

          I still have this problem. I noticed if I build qt with -no-framework, it copies all the headers, but by default it doesn't. Help!

          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