Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Call for Presentations - Qt World Summit

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

    General and Desktop
    4
    8
    8635
    Loading More Posts
    • 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
      kolegs last edited by

      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 Reply Quote 0
      • SGaist
        SGaist Lifetime Qt Champion last edited by

        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 Reply Quote 0
        • K
          kolegs last edited by

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

          1 Reply Last reply Reply Quote 0
          • SGaist
            SGaist Lifetime Qt Champion last edited by

            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 Reply Quote 0
            • K
              kolegs last edited by

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

              1 Reply Last reply Reply Quote 0
              • hskoglund
                hskoglund last edited by

                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 Reply Quote 0
                • K
                  kolegs last edited by

                  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 Reply Quote 0
                  • S
                    sorinns last edited by

                    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 Reply Quote 0
                    • First post
                      Last post