[solved] Fix for building Qt Mobility master on mac



  • Hi,

    I noticed that building Qt Mobility (git://gitorious.org/qt-mobility/qt-mobility.git) fails on mac when linking the Connectivity module (log attached below).

    Since the bluetooth module seems to be able to switch to dummy backend, I did the following change and linking succeeded.

    Is this a good idea?

    Best regards,

    Mikko

    @
    diff --git a/src/connectivity/connectivity.pro b/src/connectivity/connectivity.pro
    index 0882af6..bfbc3ad 100644
    --- a/src/connectivity/connectivity.pro
    +++ b/src/connectivity/connectivity.pro
    @@ -9,7 +9,7 @@ QT = core

    include(nfc/nfc.pri)

    -!mac:!win32:include(bluetooth/bluetooth.pri)
    +!win32:include(bluetooth/bluetooth.pri)

    HEADERS += $$PUBLIC_HEADERS $$PRIVATE_HEADERS

    @

    Build log:

    @
    ...
    g++ -headerpad_max_install_names -arch x86_64 -Xarch_x86_64 -mmacosx-version-min=10.5 -o ../../../../bin/connectivity.app/Contents/MacOS/connectivity /Users/mikko/qt/qt-mobility-gitorious/build/Debug/connectivity/main.o /Users/mikko/qt/qt-mobility-gitorious/build/Debug/connectivity/nfc.o /Users/mikko/qt/qt-mobility-gitorious/build/Debug/connectivity/devicediscovery.o /Users/mikko/qt/qt-mobility-gitorious/build/Debug/connectivity/servicediscovery.o -F/Users/mikko/qt/qt-mobility-gitorious/lib -F/usr/local/Trolltech/Qt-4.8.0/lib -L/Users/mikko/qt/qt-mobility-gitorious/lib -L/usr/local/Trolltech/Qt-4.8.0/lib -framework QtServiceFramework -framework QtConnectivity -framework QtGui -L/usr/local/Trolltech/Qt-4.8.0/lib -F/usr/local/Trolltech/Qt-4.8.0/lib -framework QtCore
    Undefined symbols:
    "QtMobility::QBluetoothServiceDiscoveryAgent::QBluetoothServiceDiscoveryAgent(QObject*)", referenced from:
    Discoverer::serviceDiscovery() in servicediscovery.o
    "QtMobility::QBluetoothServiceDiscoveryAgent::start(QtMobility::QBluetoothServiceDiscoveryAgent::DiscoveryMode)", referenced from:
    Discoverer::serviceDiscovery() in servicediscovery.o
    "QtMobility::QBluetoothDeviceDiscoveryAgent::QBluetoothDeviceDiscoveryAgent(QObject*)", referenced from:
    Discoverer::deviceDiscovery() in devicediscovery.o
    "QtMobility::QBluetoothDeviceDiscoveryAgent::start()", referenced from:
    Discoverer::deviceDiscovery() in devicediscovery.o
    @

    [EDIT: code markup, Volker]



  • This was solved in a recent commit. Excellent!

    Mikko


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.