Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. Deploying *.dylib. How?
Qt 6.11 is out! See what's new in the release blog

Deploying *.dylib. How?

Scheduled Pinned Locked Moved Unsolved Installation and Deployment
2 Posts 2 Posters 621 Views 1 Watching
  • 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.
  • B Offline
    B Offline
    bogong
    wrote on last edited by
    #1

    Hello all!

    I am trying to add *.dylib to my project. Been following instruction on website. Library added automatically via Qt Creator but I still have this result:

    $ source /var/folders/zg/syfhtrq10f76f7f68th5l3540000gn/T/tmpZRMHrK
    dyld: Library not loaded: @rpath/libzip.5.dylib
      Referenced from: /Users/alexandr/Projects/study/qt/plainc_libzip/build-plainc_libzip-Desktop_Qt_5_12_1_clang_64bit-Debug/plainc_libzip
      Reason: image not found
    Press <RETURN> to close this window...
    

    My *.pro file looks like (most of content generated by QtCreator):

    TEMPLATE = app
    CONFIG += console
    CONFIG -= app_bundle
    CONFIG -= qt
    
    SOURCES += \
            main.c
    
    HEADERS += \
        zip.h \
        zip.h \
        config.h \
        zipconf.h
    
    win32:CONFIG(release, debug|release): LIBS += -L$$PWD/./release/ -lzip.5.0
    else:win32:CONFIG(debug, debug|release): LIBS += -L$$PWD/./debug/ -lzip.5.0
    else:unix: LIBS += -L$$PWD/./ -lzip.5.0
    
    INCLUDEPATH += $$PWD/.
    DEPENDPATH += $$PWD/.
    
    LIBS += -L$$PWD/./ -llibzip.5.0.dylib
    
    #DISTFILES += \
    #    libzip.5.0.dylib \
    #libzip.5.dylib \
    #libzip.dylib
    

    Is there any valid reference or manual for adding *.dylib files?

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

      Hi,

      You need to add the DYLD_LIBRARY_PATH environment variable in the Run part of the project panel and point it to the folder where that library is located.

      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

      • Login

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