Results 1 to 1 of 1

Thread: Adding external libraries deploying QT app mac OSX

  1. #1
    Join Date
    Sep 2017
    Posts
    1
    Qt products
    Qt5
    Platforms
    MacOS X

    Default Adding external libraries deploying QT app mac OSX

    I am facing difficulty while deploying QT app which is using openCV as an external library.

    In http://doc.qt.io/qt-5/osx-deployment.html page it says : To include a 3rd party library in the application bundle, copy the library into the bundle manually, after the bundle is created.

    Also http://www.dafscollaborative.org/opencv-deploy.html blog is saying to use install_name_tool to deploy openCV with Qt app.

    Running otool -L MyApplication.app/Contents/MacOS/MyApplication gives me following :

    Qt Code:
    1. @rpath/libopencv_calib3d.3.2.dylib (compatibility version 3.2.0, current version 3.2.0)
    2. @rpath/libopencv_features2d.3.2.dylib (compatibility version 3.2.0, current version 3.2.0)
    3. @rpath/libopencv_highgui.3.2.dylib (compatibility version 3.2.0, current version 3.2.0)
    4. @rpath/libopencv_videoio.3.2.dylib (compatibility version 3.2.0, current version 3.2.0)
    5. @rpath/libopencv_imgcodecs.3.2.dylib (compatibility version 3.2.0, current version 3.2.0)
    6. @rpath/libopencv_video.3.2.dylib (compatibility version 3.2.0, current version 3.2.0)
    7. @rpath/libopencv_photo.3.2.dylib (compatibility version 3.2.0, current version 3.2.0)
    8. @rpath/libopencv_ml.3.2.dylib (compatibility version 3.2.0, current version 3.2.0)
    9. @rpath/libopencv_imgproc.3.2.dylib (compatibility version 3.2.0, current version 3.2.0)
    10. @rpath/libopencv_flann.3.2.dylib (compatibility version 3.2.0, current version 3.2.0)
    11. @rpath/libopencv_core.3.2.dylib (compatibility version 3.2.0, current version 3.2.0)
    12. @rpath/QtWidgets.framework/Versions/5/QtWidgets (compatibility version 5.10.0, current version 5.10.0)
    13. @rpath/QtGui.framework/Versions/5/QtGui (compatibility version 5.10.0, current version 5.10.0)
    14. @rpath/QtCore.framework/Versions/5/QtCore (compatibility version 5.10.0, current version 5.10.0)
    15. /System/Library/Frameworks/DiskArbitration.framework/Versions/A/DiskArbitration (compatibility version 1.0.0, current version 1.0.0)
    16. /System/Library/Frameworks/IOKit.framework/Versions/A/IOKit (compatibility version 1.0.0, current version 275.0.0)
    17. @rpath/QtXml.framework/Versions/5/QtXml (compatibility version 5.10.0, current version 5.10.0)
    18. /System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL (compatibility version 1.0.0, current version 1.0.0)
    19. /System/Library/Frameworks/AGL.framework/Versions/A/AGL (compatibility version 1.0.0, current version 1.0.0)
    20. /usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 307.5.0)
    21. /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1238.50.2)
    To copy to clipboard, switch view to plain text mode 

    So I copied the external libraries (openCV in my case) to the MyProject.app/Contents/Frameworks folder after running macdeployqt tool. Also I followed the instructions from here : https://stackoverflow.com/a/6697993/6366458 to use :
    Qt Code:
    1. install_name_tool -change <original_library_path> @executable_path/../Frameworks/<lib_name> <binary_file_name>
    To copy to clipboard, switch view to plain text mode 
    But even then its giving me image not found error when trying to run in other OSX system. Also there was no change in the otool -L result when I did these and before. I have uploaded my build directory in git : https://github.com/torrtuga/QTBuildApp. Also my code repository I have uploaded in here : https://github.com/torrtuga/QT-App

    What should I do now to run my app in other OSX device?Q
    Last edited by arqam; 8th September 2017 at 08:11.

Similar Threads

  1. Replies: 2
    Last Post: 21st August 2014, 19:36
  2. QtCreator and external libraries
    By GiuseppeBonfa in forum Qt Tools
    Replies: 6
    Last Post: 21st May 2012, 23:26
  3. Using external libraries
    By Handi in forum Newbie
    Replies: 5
    Last Post: 9th December 2010, 22:51
  4. Deploying applications with new Qt libraries
    By Luc4 in forum Qt Programming
    Replies: 0
    Last Post: 24th June 2010, 22:31
  5. Replies: 4
    Last Post: 7th May 2009, 07:19

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.