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. [QtCreator] Application cannot find Qt shared libraries on macOS

[QtCreator] Application cannot find Qt shared libraries on macOS

Scheduled Pinned Locked Moved Unsolved General and Desktop
qtcreatormacosrpathcmake
1 Posts 1 Posters 658 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
    theodelrieu
    wrote on 2 Mar 2021, 12:56 last edited by
    #1

    Hello! I'm trying to run my app in QtCreator 4.14.0, with Qt 5.15.2, on macOS BigSur (x64), but I have a @rpath problem:

    13:32:19: Starting /Users/theo/Projects/build-prt-Desktop_Qt_5_15_2_clang_64bit-Debug/prt ...
    dyld: Library not loaded: @rpath/QtQuick.framework/Versions/5/QtQuick
      Referenced from: /Users/theo/Projects/build-prt-Desktop_Qt_5_15_2_clang_64bit-Debug/prt
      Reason: image not found
    13:32:19: The program has unexpectedly finished.
    13:32:19: The process was ended forcefully.
    13:32:20: /Users/theo/Projects/build-prt-Desktop_Qt_5_15_2_clang_64bit-Debug/prt crashed.
    

    I did try to remove RPATH handling in the CMakeLists.txt by setting set(CMAKE_SKIP_RPATH TRUE), with no success...

    I've installed Qt and QtCreator with the online open-source installer, the root installation dir is at $HOME/Qt/5.15.2/, and all the frameworks are in $HOME/Qt/5.15.2/clang_64/lib.

    I found some SO posts saying I needed to uncheck the Add build library search path to DYLD_LIBRARY_PATH and DYLD_FRAMEWORK_PATH, which did not help.

    I also tried to manually set up DYLD_LIBRARY_PATH in the Projects -> Environment section, did not work either.

    The app runs in the terminal when I set DYLD_LIBRARY_PATH by hand, so there must be an option I'm missing in QtCreator.

    Here's the result of otool -L:

    @rpath/QtQuick.framework/Versions/5/QtQuick (compatibility version 5.15.0, current version 5.15.2)
    	@rpath/QtQmlModels.framework/Versions/5/QtQmlModels (compatibility version 5.15.0, current version 5.15.2)
    	@rpath/QtQml.framework/Versions/5/QtQml (compatibility version 5.15.0, current version 5.15.2)
    	@rpath/QtNetwork.framework/Versions/5/QtNetwork (compatibility version 5.15.0, current version 5.15.2)
    	@rpath/QtGui.framework/Versions/5/QtGui (compatibility version 5.15.0, current version 5.15.2)
    	@rpath/QtCore.framework/Versions/5/QtCore (compatibility version 5.15.0, current version 5.15.2)
    	/usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 904.4.0)
    	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1292.60.1)
    

    Note that I do have install_name_tool and other Xcode command line tools installed.

    Looking forward to your help!

    Theo

    1 Reply Last reply
    0

    1/1

    2 Mar 2021, 12:56

    • Login

    • Login or register to search.
    1 out of 1
    • First post
      1/1
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved