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. QtMobility header not found on Mac OS X

QtMobility header not found on Mac OS X

Scheduled Pinned Locked Moved General and Desktop
7 Posts 2 Posters 3.4k 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.
  • M Offline
    M Offline
    mentalmushroom
    wrote on last edited by
    #1

    Hello. I am trying to install QtMobility on Mac OS X. I need only the systeminfo module, so I do the following:

    ./configure -modules systeminfo -prefix /usr/local/QtMobility
    make
    make install

    I see QtSystemInfo.framework installed, but when I try to build quickstart sample, it can't find QSystemInfo header. Also I see Xcode doesn't add QtSystemInfo.framework to the project. Even if I drag it manually, it is shown in red color like a missing file. Installation guide tells I have to expand LD_LIBRARY_PATH variable, so I tried to add the following to /etc/profile:

    LD_LIBRARY_PATH=/usr/local/QtMobility/lib:$LD_LIBRARY_PATH
    export LD_LIBRARY_PATH

    Also tried to expand DYLD_LIBRARY_PATH instead. Nothing works.

    I've tried it on different Mac OS X versions (10.6 and 10.7) with no success. What should I do in order to make QtMobility available for my projects?

    1 Reply Last reply
    0
    • L Offline
      L Offline
      leon.anavi
      wrote on last edited by
      #2

      Have you tried using Qt Creator? According to "Qt Mobility 1.2.2 documentation XCode is not supported":http://doc.qt.digia.com/qtmobility/installation.html:

      bq. Note: QtMobility currently has no support for building with Xcode.

      http://anavi.org/

      1 Reply Last reply
      0
      • M Offline
        M Offline
        mentalmushroom
        wrote on last edited by
        #3

        I have tried to build it from the command line:
        qmake -spec macx-g++ quickstart.pro
        make

        It fails with the same error. I will try Qt Creator, but I scarcely believe it depends on IDE. As far as I understand, they meant building QtMobility framework with Xcode is not supported - I don't do that. Xcode is used to build a project that uses QtSystemInfo.framework.

        1 Reply Last reply
        0
        • L Offline
          L Offline
          leon.anavi
          wrote on last edited by
          #4

          [quote author="mentalmushroom" date="1364375013"]I have tried to build it from the command line:
          qmake -spec macx-g++ quickstart.pro
          make
          [/quote]

          Could you please post the whole error log?

          http://anavi.org/

          1 Reply Last reply
          0
          • M Offline
            M Offline
            mentalmushroom
            wrote on last edited by
            #5

            bash-3.2$ qmake -spec macx-g++ quickstart.pro
            bash-3.2$ make
            g++ -c -pipe -g -gdwarf-2 -arch x86_64 -Xarch_x86_64 -mmacosx-version-min=10.5 -Wall -W -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/local/Qt4.8/mkspecs/macx-g++ -I. -I/Library/Frameworks/QtCore.framework/Versions/4/Headers -I/usr/include/QtCore -I/Library/Frameworks/QtNetwork.framework/Versions/4/Headers -I/usr/include/QtNetwork -I/Library/Frameworks/QtGui.framework/Versions/4/Headers -I/usr/include/QtGui -I/usr/include -I. -I. -F/Library/Frameworks -o main.o main.cpp
            main.cpp:45:29: error: QSystemInfo: No such file or directory
            main.cpp:49: error: expected constructor, destructor, or type conversion before ‘int’
            make: *** [main.o] Error 1
            bash-3.2$

            1 Reply Last reply
            0
            • L Offline
              L Offline
              leon.anavi
              wrote on last edited by
              #6

              Please make sure that your pro file includes the following configuration:

              @
              CONFIG += mobility
              MOBILITY = systeminfo
              @

              And specify Qt Mobility namespace:
              @
              #include <QSystemInfo>

              QTM_USE_NAMESPACE
              @

              If this doesn't then most probably Qt Mobility is not installed successfully. You can check other threads in "Qt Project's forum for similar issues and hints for settings DYLD_LIBRARY_PATH on Mac OS":http://qt-project.org/forums/viewthread/3064/

              http://anavi.org/

              1 Reply Last reply
              0
              • M Offline
                M Offline
                mentalmushroom
                wrote on last edited by
                #7

                Yes, it does include

                @CONFIG += mobility

                MOBILITY = systeminfo@

                Moreover, it is a sample project shipped along with QtMobility that shows the proper basic usage of QtMobility framework.

                I didn't see any error messages while installing QtMobility. Only while configuring it failed to find something, but it didn't seem to be needed for systeminfo module, so it succeeded to build. I have it installed in the desired location, only it is not visible to my project. I see LD_LIBRARY_PATH and DYLD_LIBRARY_PATH extend the library paths, but my issue is about headers. So I need to find a way to make headers available. Documentation simply keeps silence about it :(

                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