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. Qmake: import an OSX framework from ~/Library/Frameworks
QtWS25 Last Chance

Qmake: import an OSX framework from ~/Library/Frameworks

Scheduled Pinned Locked Moved General and Desktop
4 Posts 3 Posters 9.2k 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.
  • T Offline
    T Offline
    tallia1
    wrote on last edited by
    #1

    Hey guys,

    I am wondering whether you think this is the simplest way to include
    an OSX framework which is deployed in the user folder "~/Library/Frameworks"

    @
    TARGET = taucs_demo
    TEMPLATE = app
    QT -= core gui
    CONFIG += console
    CONFIG -= app_bundle

    Import framework

    QMAKE_CXXFLAGS += -F$$(HOME)/Library/Frameworks
    QMAKE_LFLAGS += -F$$(HOME)/Library/Frameworks
    LIBS += -framework Taucs

    SOURCES += main.cpp
    @

    I have also experimented with setting DYLD_FRAMEWORK_PATH
    in my "~/.bashrc" or inside the Qt Creator variables without
    much luck...

    Don't you think the QMAKE_CXXFLAGS/QMAKE_LFLAGS combo
    is particularly ugly? I wish there was something like:

    @
    FRAMEWORKPATH += ....
    @

    Thoughts?

    1 Reply Last reply
    0
    • T Offline
      T Offline
      tucnak
      wrote on last edited by
      #2

      Advice

      Don't use QMAKE in state of label: [QMAKE]. Yust like this: qmake: Import a framework from ~/Library/Frameworks. Label must be [SOLVED] or [SELF-SOLVED].

      Solution

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

        In order to include frameworks to your project, you need to add to both, the include path and the library path. I would try this:

        @
        INCLUDEPATH += -F$$(HOME)/Library/Frameworks
        LIBS += -F$$(HOME)/Library/Frameworks -framework Taucs
        @

        I didn't test this, though. I would need to setup a test case with a framework in a non-standard path. Everything in /System is found anyways :-)

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

        1 Reply Last reply
        1
        • T Offline
          T Offline
          tallia1
          wrote on last edited by
          #4

          Thanks Volker. I still think that is still sort of badly designed...

          Let me add something else, I wish Qt created its own "framework" structure, which a qt user could then use to organize his project in a cross platform fashion... Perhaps with the ability to contain compiled binaries for a number of operating systems.

          I find it terribly annoying that Qt goes a long way toward cross-platform, yet it stops one step short...

          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