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. Qwt on mac os x
QtWS25 Last Chance

Qwt on mac os x

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

    Hi everybody. I have compiled qwt using qtcreator. Now I have two directories, "qwt.framework" and "qwtmathml.framework".
    In my project I have appended at my .pro file these rows:

    INCLUDEPATH += ../../qwt-6.0.1/src
    LIBS += ../../qwt-6.0.1/lib/qwt.framework/qwt
    LIBS += ../../qwt-6.0.1/lib/qwtmathml.framework/qwtmathml

    The compilation goes well but, on run time I obtain this error:

    "dyld: Library not loaded: qwt.framework/Versions/6/qwt
    Referenced from: /Users/denis/C++/...
    Reason: image not found"
    Where I must put the libraries in order to run the program?

    Need programmers to hire?
    www.labcsp.com
    www.denisgottardello.it
    GMT+1
    Skype: mrdebug

    1 Reply Last reply
    0
    • H Offline
      H Offline
      hardcodes.de
      wrote on last edited by
      #2

      I'd say that you must provide those frameworks in the "application bundle":http://doc-snapshot.qt-project.org/4.8/deployment-mac.html .

      while(!sleep){++sheep;}

      1 Reply Last reply
      0
      • mrdebugM Offline
        mrdebugM Offline
        mrdebug
        wrote on last edited by
        #3

        Thanks for your reply. Do you think that I must copy the folders “qwt.framework” and “qwtmathml.framework” in ".app/Contents/Frameworks"?

        Need programmers to hire?
        www.labcsp.com
        www.denisgottardello.it
        GMT+1
        Skype: mrdebug

        1 Reply Last reply
        0
        • H Offline
          H Offline
          hardcodes.de
          wrote on last edited by
          #4

          I think you must copy whatever is mentioned in the
          "Referenced from: /Users/denis/C++/…"
          line must be copied.

          The magic part is changing the reference to the new location inside the bundle. That is explained in the linked article.

          while(!sleep){++sheep;}

          1 Reply Last reply
          0
          • mrdebugM Offline
            mrdebugM Offline
            mrdebug
            wrote on last edited by
            #5

            The libraries are 2:
            qwt.framework
            qwtmathml.framework
            I think that the program finds correctly the library but qwt.framework wants qwtmathml.framework for run but does not find it.
            See the error:

            Dyld Error Message:
            Library not loaded: qwt.framework/Versions/6/qwt
            Referenced from: /Users/USER/*/DomusBossClient.app/Contents/MacOS/../Frameworks/qwtmathml.framework/Versions/6/qwtmathml
            Reason: image not found

            Need programmers to hire?
            www.labcsp.com
            www.denisgottardello.it
            GMT+1
            Skype: mrdebug

            1 Reply Last reply
            0
            • U Offline
              U Offline
              uranusjr
              wrote on last edited by
              #6

              You can use either of the following methods:

              a) Instruct the OS where to find the lib

              Set DYLD_FRAMEWORK_PATH in your environment. (Equivalent to Linux's LD_LIBRARY_PATH.) Mac OS X's fallback mechanism makes it looks for frameworks in paths specified by this env var.

              Positive: You don't need to mangle with the compiled executable.
              Negative: You need to set this on every environment. What's worse, this variable overwrites ALL application's framework finding mechanism, thus causing potential bugs.
              Suitable for: Testing. Especially when using an IDE, in which case you can set it in the run setting once and for all without affecting system environment. For example, you can do "this":http://d.pr/i/JM9E in Qt Creator.

              b) Use "otool":http://developer.apple.com/library/mac/#documentation/Darwin/Reference/ManPages/man1/otool.1.html
              Using otool, you can modify the lookup table for a particular application. If you find this tool inconvenient (it is), "macdeployqt":http://qt-project.org/doc/qt-4.8/deployment-mac.html might be useful.

              Positive: Does not pollute system environment
              Negative: Need extra work every time after the application is built
              Suitable for: Deployment. You don't do this very often, and you can't control your users' running environment.

              c) "Static build":http://qt-project.org/doc/qt-4.8/deployment-mac.html#static-linking
              If you build everything statically, there won't any lookups! Yay!!

              Positive: No extra steps needed
              Negative: You need some knowledge to do that. And if you do, you may find this option not so intriguing. (see note)
              Suitable for: People who care building a static version of Qt (and all related frameworks).

              (Note: Qwt, unlike Qt itself, does not require the author to provide the source even if you use static linking. Therefore, you can work around the licensing issue by statically linking only to Qwt. This can be done, but is certainly not a simple task.)

              1 Reply Last reply
              0
              • mrdebugM Offline
                mrdebugM Offline
                mrdebug
                wrote on last edited by
                #7

                Thanks for reply. I think that the program wants the libraries in /usr/local/lib but I want to include them in .app

                Need programmers to hire?
                www.labcsp.com
                www.denisgottardello.it
                GMT+1
                Skype: mrdebug

                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