Tech Forum Network

Programming, technical solutions and hot scripts
Home » TechQns » Deploying Qt application, on Mac OSX and Linux, what libraries do I need to include in package?

Deploying Qt application, on Mac OSX and Linux, what libraries do I need to include in package?

September 24, 2014 Posted by forumadmin under TechQns
Comments off

I am trying to package / deploy a Qt app, in Linux and mac. (Qt 4.8). I have to use shared libraries due to licensing type.

in Linux, following Qt documentation, I ran ldd myprogram and got an output like

linux-gate.so.1 =>  (0xb76fa000)
libOneOfMyLibs.so.1 => /usr/local/lib/libOneOfMyLibs.so.1 (0xb76d7000)
libQtGui.so.4 => /usr/lib/i386-linux-gnu/libQtGui.so.4 (0xb5440000)
libQtCore.so.4 => /usr/lib/i386-linux-gnu/libQtCore.so.4 (0xb501a000)
.......
libgpg-error.so.0 => /lib/i386-linux-gnu/libgpg-error.so.0 (0xb4316000)
libm.so.6 => /lib/i386-linux-gnu/libm.so.6 (0xb4fba000)
libgcc_s.so.1 => /lib/i386-linux-gnu/libgcc_s.so.1 (0xb4f9c000)
libc.so.6 => /lib/i386-linux-gnu/libc.so.6 (0xb4df0000)
libcups.so.2 => /usr/lib/i386-linux-gnu/libcups.so.2 (0xb4d91000)
libsqlite3.so.0 => /usr/lib/i386-linux-gnu/libsqlite3.so.0 (0xb4cbb000)
libdl.so.2 => /lib/i386-linux-gnu/libdl.so.2 (0xb4cb6000)
libz.so.1 => /lib/i386-linux-gnu/libz.so.1 (0xb4c99000)
libfontconfig.so.1 => /usr/lib/i386-linux-gnu/libfontconfig.so.1 (0xb4c56000)
libaudio.so.2 => /usr/lib/i386-linux-gnu/libaudio.so.2 (0xb4c3c000)
libglib-2.0.so.0 => /lib/i386-linux-gnu/libglib-2.0.so.0 (0xb4b41000)
libpng12.so.0 => /lib/i386-linux-gnu/libpng12.so.0 (0xb4b14000)
libfreetype.so.6 => /usr/lib/i386-linux-gnu/libfreetype.so.6 (0xb4a67000)
libgobject-2.0.so.0 => /usr/lib/i386-linux-gnu/libgobject-2.0.so.0 (0xb4a16000)
.....

very many dependencies, only some of them are Qt libs . But then they say, that since it cannot be certain what the installed program will be running, I should package all the library dependencies.

There are sooo many !!! I definitely require some of them like sqlite3. I also read that libfreetype and libfontconfig are required since they may be different on the new system.

How can I know which libs are required though ? Should I package all of them ?

The mac directions only show that I must add the Qt libraries. Even though, listing dependencies on mac, I get

myprogram.app/Contents/MacOS/myprogram:
    libOneOfMyLibs.1.dylib (compatibility version 1.0.0, current version 1.0.0)
    /usr/local/lib/libsqlite3.0.dylib (compatibility version 9.0.0, current version 9.6.0)
    /usr/lib/libcups.2.dylib (compatibility version 2.0.0, current version 2.8.0)
    QtGui.framework/Versions/4/QtGui (compatibility version 4.8.0, current version 4.8.6)
    QtCore.framework/Versions/4/QtCore (compatibility version 4.8.0, current version 4.8.6)
    ....
    /usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 7.9.0)
    /usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 832.0.0)
    /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 125.2.11)

on mac – do I need to add libstdc++.6.dylib and the rest ?

From Qt documentation:

“The application bundle contains the application executable as well as
dependencies such as the Qt libraries, plugins, translations and other
resources you may need. Third party libraries like Qt are normally not
installed system-wide; each application provides its own copy.”

To summarize my question:

If I do not want to make any assumptions about the system I want to deploy for, do I need to add all the system library dependencies, or only the Qt libraries, or… which are the libraries that I must add to my package ?

 

Asked By – Thalia        Read Answers    

More Related Questions

  • How to add library to app dependency list in QtCreator I'm trying to create QtQuick extention, and can't understand, how I can add it to my app project, that it was compiling, picks, and for android, packing in one apk? I have: dev_root […]
  • Building PyQT App for Macosx Hi I am trying to build one simple PyQt app for mac osx using cx_freeze, the building process completed without any error and it is creating Myapplication.app file. But When I am trying […]
  • How do I view the list of functions a Linux shared library is exporting? I want to view the exported functions of a shared library on Linux. What command allows me to do this? (On Windows I use the program depends)  Asked By - […]
  • ld cannot find an existing library I am attempting to link an application with g++ on this Debian lenny system. ld is complaining it cannot find specified libraries. The specific example here is ImageMagick, but I am having […]
  • Setting up OpenCV in QT on OSX I am trying to set up OpenCV to work with QT on OSX 10.7.5/MacbookPro 2.5 Ghz Intel Core 2 Duo. I've seen a few related question here (How to link opencv in QtCreator and use Qt library […]
  • Linux, can I redirect the debug output of a external library (.so) I'm developing an app in qt c++, on linux (and then others platforms). I'm using a library of third part in my project. During the program execution the library writes debug messages on my […]
  • Cant run another application, when I start debugger I'm programming in Ubuntu 14.04 with Qt 5.3. I want to run an external application system("flowgeneratormanager &"); from my host app.The external app is in /usr/bin/ directory. When […]
  • Platform "windows" I have a problem deploying my Qt 5.3.1 application. This is my folder structure: platforms\ qwindows.dll qminimal.dll libEGL.dll sqldrivers\ […]
  • QtCreator – back slashes in path prevents QT application from deploying to andoid I try to create qtquick extention and app which uses it. The project root folder is: f:/work/app-project. There is all.pro file in that folder: TEMPLATE = subdirs SUBDIRS += \ app \ […]
  • multiple definition of soap_code_bits in stdsoap.cpp Under Linux I use Qt to build a gsoap project. when I build theproject, errors: multiple definition of 'soap_code_bits' in stdsoap.cpp More than 200 over the same errors. the […]
0
  
Email
Tags: deployment, linux, osx, qt, shared-libraries

Comments are closed.

« Doctrine2 cascade remove with multiple parents
Why my own authentication doesnt work with my own model in Laravel? »
Tech Forum Network powered by WordPress and The Clear Line Theme