Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. 3rd Party Software
  4. Framework headers

Framework headers

Scheduled Pinned Locked Moved Unsolved 3rd Party Software
12 Posts 2 Posters 3.3k 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.
  • D Offline
    D Offline
    deleted408
    wrote on last edited by
    #3

    The framework's real name is CsoundLib64.framework. Sorry for any confusion. I got it from the csound website "csounds.com" when I downloaded the "csound-develop" developer tools, version 6.10.0 from there.

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #4
      QMAKE_CXXFLAGS += -F/path/to/folder/containing/the/framework
      LIBS += -F/path/to/folder/containing/the/framework -framework CsoundLib64
      

      The first line is to generate the include path that allows you to write #include <CsoundLib64/csound.h>
      The second is for the linking.

      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
      2
      • D Offline
        D Offline
        deleted408
        wrote on last edited by
        #5

        The only error I got after I added your two lines of code is:
        'CsoundLib64/csound.h' file not found
        I entered '#include <CsoundLib64/csound.h>' at the top of my mainwindow.h file but the compiler doesn't seem to be picking it up. Any suggestions would be greatly appreciated.

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

          Not knowing how your project is made, try with QMAKE_CFLAGS in place of QMAKE_CXXFLAGS .

          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
          • D Offline
            D Offline
            deleted408
            wrote on last edited by
            #7

            I tried your C based technique but I'm still getting the same ''CsoundLib64/csound.h' file not found' error. I think the problem might actually be because the path to the CsoundLIb64.framework is this:
            ../CsoundLib64.framework/Headers/csound.h
            NOT CsoundLib64.framework/csound.h.
            This is a simple problem but I haven't found an alternate path and include pair for my .pro and mainwindow.h files. Again, any suggestions would be appreciated.

            1 Reply Last reply
            0
            • D Offline
              D Offline
              deleted408
              wrote on last edited by
              #8

              I fixed the immediate problem but I am working with a toolset that is new to me so there's a chance I'll be back in this forum sometime relatively soon. Thank you very much for your help.

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

                No it's not, macOS framework headers are expected to be found in the Headers subfolder and should be included using the #include <FrameworkName/includename.h> statement.

                Please show your .pro file.

                From what you wrote I suspect you are using relative paths to source folder which is not a good idea. Use $$PWD if you are doing that to ensure that tools get a the full path to where your framework is.

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

                D 1 Reply Last reply
                1
                • SGaistS SGaist

                  No it's not, macOS framework headers are expected to be found in the Headers subfolder and should be included using the #include <FrameworkName/includename.h> statement.

                  Please show your .pro file.

                  From what you wrote I suspect you are using relative paths to source folder which is not a good idea. Use $$PWD if you are doing that to ensure that tools get a the full path to where your framework is.

                  D Offline
                  D Offline
                  deleted408
                  wrote on last edited by
                  #10

                  @SGaist
                  Here is my .pro file starting with the sources:
                  SOURCES +=
                  main.cpp
                  mainwindow.cpp

                  HEADERS +=
                  mainwindow.h
                  ../5.10.1/clang_64/NewBuildLocation/portaudio.h
                  ../5.10.1/Src/qtbase/examples/NewBuildLocation/portmidi.h
                  ../5.10.1/Src/qtbase/examples/qmake/NewBuildLocation/porttime.h
                  ../CsoundLib64.framework/Versions/6.0/Headers/csound.hpp \

                  FORMS +=
                  mainwindow.ui

                  LIBS += -lportmidi
                  -lportaudio

                  QMAKE_CXXFLAGS += -F~/Library/Frameworks/CsoundLib64.framework/Headers
                  LIBS += -F~/Library/Frameworks -framework CsoundLib64

                  macx: LIBS += -L$$PWD/../5.10.1/clang_64/NewBuildLocation/ -lportmidi

                  INCLUDEPATH += $$PWD/../5.10.1/clang_64/NewBuildLocation
                  DEPENDPATH += $$PWD/../5.10.1/clang_64/NewBuildLocation

                  macx: LIBS += -L$$PWD/../5.10.1/clang_64/NewBuildLocation/ -lportaudio

                  INCLUDEPATH += $$PWD/../5.10.1/clang_64/NewBuildLocation
                  DEPENDPATH += $$PWD/../5.10.1/clang_64/NewBuildLocation

                  mac: LIBS += -F$$PWD/../../../../Library/Frameworks/ -framework CsoundLib64

                  INCLUDEPATH += $$PWD/../../../../Library/Frameworks
                  DEPENDPATH += $$PWD/../../../../Library/Frameworks

                  When I attempt to #include csound.hpp into my .pro file, w/control-right-click "Add existing files" Qt Creator generates, what I think is, a RELATIVE path shown above in the last line of the "HEADERS" section of my .pro file shown above as
                  ../CsoundLib64.framework/Versions/6.0/Headers/csound.hpp
                  When I attempt to include an existing library into my .pro file, CsoundLib64.framework here, w/control-right-click "Add libraries"
                  Qt Creator generates, what I think is, an ABSOLUTE path shown above as
                  mac: LIBS += -F$$PWD/../../../../Library/Frameworks/ -framework CsoundLib64
                  in the last section of my .pro file.

                  These are the two techniques I used to implement the necessary library/framework and header files into my .pro file.
                  When including csound.hpp into my main.cpp file I use
                  #include <CsoundLib64.framework/csound.hpp>
                  at the top of my main.cpp (where my actual code implementation goes - left out here), I get the error:
                  'CsoundLib64.framework/csound.hpp' file not found
                  When I change my main.cpp #includeS to
                  #include <CsoundLib64.framework/Versions/6.0/Headers/csound.hpp>
                  or
                  #include <CsoundLib64.framework/Headers/csound.hpp>
                  which are two ways to #include my csound.hpp header fIle, that (might) complement my .pro file above I get these two errors:
                  symbol(s) not found for architecture x86_64 &
                  linker command failed with exit code 1 (use -v to see invocation)
                  I know that the second error means that something in my project isn't linking, but I don't know what the second error implies.
                  Any assistance with these build errors and information of Qt build processes in general would be greatly appreciated.

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

                    Don't use the ~ that's a bash shortcut that must be interpreted.

                    Then your -F value is wrong, you have to put there the path to the folder that contains the .framework you want to use. It's an equivalent of the -L parameter for libraries.

                    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
                    1
                    • D Offline
                      D Offline
                      deleted408
                      wrote on last edited by
                      #12

                      @SGaist
                      I have fixed the problem - I'm now implementing the tools that I have wanted to implement without any long lasting errors. I just started a new project over and doing that led me to solve my problems (along with your techniques & guidance) though I would like to leave it out of this context here in the forum.
                      Thank you for your time and patience.
                      Patrick

                      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