Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. [solved] Headers with path not found on IOS

[solved] Headers with path not found on IOS

Scheduled Pinned Locked Moved Mobile and Embedded
6 Posts 2 Posters 2.5k 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.
  • J Offline
    J Offline
    jnbrunet
    wrote on last edited by
    #1

    I have a problem compiling my project for IOS. Everything build fine on linux and macx.

    The compiler fail to find my included headers when I specified a path for the file. For example,

    @#include "include/machine/E15_00_SYSTEME_INJECTION.h"@

    This header file will not be found. The include folder is in located inside my root project folder :

    /myproject/include

    Here is my .pro file.

    @
    TEMPLATE = app

    QT += qml quick widgets

    SOURCES +=
    src/main.cpp
    src/machine.cpp
    src/com/machineObj.cpp
    src/com/mybuslistener.cpp
    src/com/machine_com.cpp
    src/inventory.cpp
    src/alljoynbridge.cpp

    HEADERS +=
    include/machine.h
    include/com/machineObj.h
    include/com/machine_obj_message.h
    include/com/mybuslistener.h
    include/com/interface_struct.h
    include/machine/00_PF9_SI_0000.h
    include/machine/E15_SI_00_SYSTEME_INJECTION.h
    include/com/machine_com.h
    include/inventory.h
    include/machine/E15_00_SYSTEME_INJECTION.h
    include/alljoynbridge.h

    RESOURCES += resources/qml.qrc

    Additional import path used to resolve QML modules in Qt Creator's code model

    QML_IMPORT_PATH = resources/

    Linux

    unix:!mac {
    LIBS += -L/home/mathben/Downloads/alljoyn/alljoyn-suite-14.06.00-src/core/alljoyn/build/linux/x86_64/debug/dist/cpp/lib/ -lalljoyn -lstdc++ -lcrypto -lpthread -lrt -lboost_system
    }

    Mac os

    macx {
    _BOOST_PATH = /usr/local/Cellar/boost/1.56.0
    _ALLJOYN_PATH = /Users/jn/Documents/alljoyn/alljoyn-suite-14.06.00a-src/core/alljoyn/build/darwin/x86/debug/dist/cpp

    LIBS += -L$${_BOOST_PATH}/lib -lboost_system
    INCLUDEPATH += "$${_BOOST_PATH}/include/"
    DEPENDPATH += "$${_BOOST_PATH}/include/"
    
    
    LIBS += -L$${_ALLJOYN_PATH}/lib -lalljoyn -lstdc++ -lcrypto -lpthread
    INCLUDEPATH += "$${_ALLJOYN_PATH}/inc"
    DEPENDPATH += "$${_ALLJOYN_PATH}/inc"
    
    DEFINES += QCC_CPU_X86
    DEFINES += QCC_OS_GROUP_POSIX
    DEFINES += QCC_OS_DARWIN
    
    QMAKE_MAC_SDK = macosx10.10
    

    }

    IOS

    ios {
    CONFIG+=c++11

    _BOOST_PATH = /Users/jn/sources/ofxiOSBoost/libs/boost
    _ALLJOYN_PATH = /Users/jn/alljoyn-14.12.00-osx_ios-sdk
    
    LIBS += -L$${_BOOST_PATH}/ios -lboost_system
    INCLUDEPATH += "$${_BOOST_PATH}/include/boost"
    DEPENDPATH += "$${_BOOST_PATH}/include/boost"
    
    LIBS += -L$${_ALLJOYN_PATH}/build/darwin/armv7/iphoneos/debug/dist/cpp/lib -lalljoyn -lajrouter -lBundledRouter.o  -lstdc++ -lpthread
    INCLUDEPATH += "$${_ALLJOYN_PATH}/build/darwin/armv7/iphoneos/debug/dist/cpp/inc"
    INCLUDEPATH += "$${_ALLJOYN_PATH}/alljoyn_objc/AllJoynFramework/AllJoynFramework"
    DEPENDPATH += "$${_ALLJOYN_PATH}/build/darwin/armv7/iphoneos/debug/dist/cpp/inc"
    
    DEFINES += QCC_OS_GROUP_POSIX
    DEFINES += QCC_OS_DARWIN
    

    }

    Default rules for deployment.

    include(deployment.pri)

    FORMS +=

    OTHER_FILES +=
    README.md

    @

    Thank you !

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi and welcome to devnet,

      I'd use this:

      @
      INCLUDEPATH+= $$PWD/include
      @

      And avoid having "include" in the #include lines file path

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • J Offline
        J Offline
        jnbrunet
        wrote on last edited by
        #3

        Hi and thank you for your reply.

        Is there any way we can avoid to do this? The project needs to compile on linux, android, mac and iOS.

        We got a lot of #include lines with a path inside. This problem happens only with iOS :-( It would be a lot of work to change those include lines.

        Thank you !

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          Then try again with:

          @INCLUDEPATH+= $$PWD@

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0
          • J Offline
            J Offline
            jnbrunet
            wrote on last edited by
            #5

            Thank you that resolved the problem!

            1 Reply Last reply
            0
            • SGaistS Offline
              SGaistS Offline
              SGaist
              Lifetime Qt Champion
              wrote on last edited by
              #6

              You're welcome !

              Since your path are now found, please update the thread title prepending [solved] so other forum users may know a solution has been found :)

              Interested in AI ? www.idiap.ch
              Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

              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