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. [SOLVED][MacOS] Problem with libraries, can't start the program

[SOLVED][MacOS] Problem with libraries, can't start the program

Scheduled Pinned Locked Moved General and Desktop
8 Posts 4 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.
  • K Offline
    K Offline
    kolegs
    wrote on last edited by
    #1

    Hi,

    I got a problem running my application on MacOS, it compiles but can't start it. It works just fine on Android and iOS.
    There is an output I get after start:
    @dyld: Library not loaded: /work/build/PADDING/lib/QtQuick.framework/Versions/5/QtQuick
    Referenced from: /Users/olek/Documents/build-DEIMIC-Desktop_Qt_5_2_1_clang_64bit-Debug/DEIMIC.app/Contents/MacOS/DEIMIC
    Reason: image not found@

    I used @otool -L@ command but I am not very familiar with MacOS and I am not sure what I should do.
    There is an output:
    @DEIMIC:
    /work/build/PADDING/lib/QtQuick.framework/Versions/5/QtQuick (compatibility version 5.2.0, current version 5.2.1)
    /work/build/PADDING/lib/QtQml.framework/Versions/5/QtQml (compatibility version 5.2.0, current version 5.2.1)
    /work/build/PADDING/lib/QtNetwork.framework/Versions/5/QtNetwork (compatibility version 5.2.0, current version 5.2.1)
    /work/build/PADDING/lib/QtCore.framework/Versions/5/QtCore (compatibility version 5.2.0, current version 5.2.1)
    /work/build/PADDING/lib/QtGui.framework/Versions/5/QtGui (compatibility version 5.2.0, current version 5.2.1)
    /work/build/PADDING/lib/QtSvg.framework/Versions/5/QtSvg (compatibility version 5.2.0, current version 5.2.1)
    /work/build/PADDING/lib/QtWidgets.framework/Versions/5/QtWidgets (compatibility version 5.2.0, current version 5.2.1)
    /work/build/PADDING/lib/QtDeclarative.framework/Versions/5/QtDeclarative (compatibility version 5.2.0, current version 5.2.1)
    /work/build/PADDING/lib/QtXmlPatterns.framework/Versions/5/QtXmlPatterns (compatibility version 5.2.0, current version 5.2.1)
    /work/build/PADDING/lib/QtSql.framework/Versions/5/QtSql (compatibility version 5.2.0, current version 5.2.1)
    /work/build/PADDING/lib/QtScript.framework/Versions/5/QtScript (compatibility version 5.2.0, current version 5.2.1)
    /System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL (compatibility version 1.0.0, current version 1.0.0)
    /System/Library/Frameworks/AGL.framework/Versions/A/AGL (compatibility version 1.0.0, current version 1.0.0)
    /usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 56.0.0)
    /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 169.3.0)@

    Thanks in advance.

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

      Hi,

      Do you mean by double clicking on the executable ? If so, did you run macdeployqt ?

      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
      • K Offline
        K Offline
        kolegs
        wrote on last edited by
        #3

        I get this error after starting the app from Qt (cmd+r).

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

          Sorry for the late reply, this generally comes from an installation that ended with an error.

          Did you properly setup Xcode before installing Qt ?

          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
          • K Offline
            K Offline
            kolegs
            wrote on last edited by
            #5

            I think so, since I can use Qt to compile program for iOS, the problem is only with Mac

            1 Reply Last reply
            0
            • hskoglundH Offline
              hskoglundH Offline
              hskoglund
              wrote on last edited by
              #6

              Hi, when you see that "PADDING" in otool, that is what SGaist says, from an installation of Qt that ended prematurely.

              You could check your Mac installation in QtCreator, go to Preferences, Build & Run, select the Qt Versions tab. Look under "Auto-detected", it should say "Qt 5.2.1 clang 64bit....". Click on that line. Then open first Details box a bit below and check the "QT_INSTALL_LIBS", it should say something like "/Users/olek/Qt/5.2.1/clang_64/lib.

              1 Reply Last reply
              0
              • K Offline
                K Offline
                kolegs
                wrote on last edited by
                #7

                I checked it and it is set just the way you said it should:
                @
                Nazwa:
                Qt 5.2.1 clang 64bit
                ABI:
                x86-macos-generic-mach_o-64bit
                Źródło:
                /Users/olek/Qt/5.2.1/clang_64
                mkspec:
                macx-clang
                qmake:
                /Users/olek/Qt/5.2.1/clang_64/bin/qmake
                Wersja:
                5.2.1
                QMAKE_SPEC
                macx-clang
                QMAKE_VERSION
                3.0
                QMAKE_XSPEC
                macx-clang
                QT_HOST_BINS
                /Users/olek/Qt/5.2.1/clang_64/bin
                QT_HOST_DATA
                /Users/olek/Qt/5.2.1/clang_64
                QT_HOST_LIBS
                /Users/olek/Qt/5.2.1/clang_64/lib
                QT_HOST_PREFIX
                /Users/olek/Qt/5.2.1/clang_64
                QT_INSTALL_ARCHDATA
                /Users/olek/Qt/5.2.1/clang_64
                QT_INSTALL_BINS
                /Users/olek/Qt/5.2.1/clang_64/bin
                QT_INSTALL_CONFIGURATION
                /Library/Preferences/Qt
                QT_INSTALL_DATA
                /Users/olek/Qt/5.2.1/clang_64/
                QT_INSTALL_DEMOS
                /Users/olek/Qt/5.2.1/clang_64/examples
                QT_INSTALL_DOCS
                /Users/olek/Qt/5.2.1/clang_64/doc
                QT_INSTALL_EXAMPLES
                /Users/olek/Qt/5.2.1/clang_64/examples
                QT_INSTALL_HEADERS
                /Users/olek/Qt/5.2.1/clang_64/include
                QT_INSTALL_IMPORTS
                /Users/olek/Qt/5.2.1/clang_64/imports
                QT_INSTALL_LIBEXECS
                /Users/olek/Qt/5.2.1/clang_64/libexec
                QT_INSTALL_LIBS
                /Users/olek/Qt/5.2.1/clang_64/lib
                QT_INSTALL_PLUGINS
                /Users/olek/Qt/5.2.1/clang_64/plugins
                QT_INSTALL_PREFIX
                /Users/olek/Qt/5.2.1/clang_64
                QT_INSTALL_QML
                /Users/olek/Qt/5.2.1/clang_64/qml
                QT_INSTALL_TESTS
                /Users/olek/Qt/5.2.1/clang_64/tests
                QT_INSTALL_TRANSLATIONS
                /Users/olek/Qt/5.2.1/clang_64/translations
                QT_SYSROOT

                QT_VERSION
                5.2.1
                @
                The only missing value is QT_SYSROOT

                EDIT: Anyway I will try to reinstall Qt and see the result

                EDIT 2: Not sure what is the difference but after reinstalling it works.
                Thanks guys.

                1 Reply Last reply
                0
                • S Offline
                  S Offline
                  sorinns
                  wrote on last edited by
                  #8

                  You need to reference somewhere in the install procedure for mac that you do need to RUN XCODE and agree the software license before installing Qt.
                  Only having it installed is not enough.

                  It's maybe logical, but not for a newbie that only want for example to do some interface mockup and he is not interested at all in xcode.

                  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