Show library dependencies: Difference between revisions
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
[[Category:Developing with Qt]]<br />[toc align_right="yes&quot; depth="2&quot;] | |||
The tools used to detect the libraries an executable or another shared library depends on are highly platform dependend. Find the tools for various systems (and basic usage for some of them) listed below. | The tools used to detect the libraries an executable or another shared library depends on are highly platform dependend. Find the tools for various systems (and basic usage for some of them) listed below. | ||
Be aware that the tools not necessarily show you '''all''' the libraries you need! | Be aware that the tools not necessarily show you '''all''' the libraries you need! It's best to separately check the dependency libraries too. | ||
Watch out for plugins, that might pull in further dependencies! | Watch out for plugins, that might pull in further dependencies! | ||
The wiki page [[ | The wiki page [[Qt_library_cross_dependencies]] lists some of the cross dependencies of the Qt libraries. | ||
=Linux= | = Linux = | ||
Linux uses the | Linux uses the "ldd&quot; command to show the libraries that are linked to an executable or another shared library: | ||
ldd prints the path to the library and some address after the =>. | ldd prints the path to the library and some address after the =&gt;. "not found&quot; is printed in case the library is missing. | ||
'''Be aware:''' The libraries are not sorted by name in the output! | '''Be aware:''' The libraries are not sorted by name in the output! | ||
=OS X | <code><br />$ ldd myFancyProgram<br /> linux-vdso.so.1 => (0x00007fffd6d17000)<br /> libcurl-gnutls.so.4 => /usr/lib/libcurl-gnutls.so.4 (0x00007feb7c45a000)<br /> libMagick+''.so.10 => /usr/lib/libMagick.so.10 (0x00007feb7c1e3000)<br /> libWand.so.10 => /usr/lib/libWand.so.10 (0x00007feb7bf1c000)<br /> libMagick.so.10 => /usr/lib/libMagick.so.10 (0x00007feb7bb25000)<br /> libQtAssistantClient.so.4 => /usr/lib/libQtAssistantClient.so.4 (0x00007feb7b91f000)<br /> libpthread.so.0 => /lib/libpthread.so.0 (0x00007feb7b703000)<br /> libQtWebKit.so.4 => /usr/lib/libQtWebKit.so.4 (0x00007feb7aa8a000)<br /> libQtSvg.so.4 => /usr/lib/libQtSvg.so.4 (0x00007feb7a836000)<br /> libQt3Support.so.4 => /usr/lib/libQt3Support.so.4 (0x00007feb7a30b000)<br /> libQtXml.so.4 => /usr/lib/libQtXml.so.4 (0x00007feb7a0c2000)<br /> libQtGui.so.4 => /usr/lib/libQtGui.so.4 (0x00007feb7955c000)<br /> libQtNetwork.so.4 => /usr/lib/libQtNetwork.so.4 (0x00007feb79253000)<br /> libQtCore.so.4 => /usr/lib/libQtCore.so.4 (0x00007feb78e11000)<br /> libstdc.so.6 => /usr/lib/libstdc.so.6 (0x00007feb78b06000)<br /> libm.so.6 => /lib/libm.so.6 (0x00007feb78885000)<br /> libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x00007feb78677000)<br /> libc.so.6 => /lib/libc.so.6 (0x00007feb78315000)<br /> libidn.so.11 => /usr/lib/libidn.so.11 (0x00007feb780e3000)<br /> libldap_r-2.4.so.2 => /usr/lib/libldap_r-2.4.so.2 (0x00007feb77e9e000)<br /> libgssapi_krb5.so.2 => /usr/lib/libgssapi_krb5.so.2 (0x00007feb77c73000)<br /> libkrb5.so.3 => /usr/lib/libkrb5.so.3 (0x00007feb779dc000)<br /> libk5crypto.so.3 => /usr/lib/libk5crypto.so.3 (0x00007feb777b8000)<br /> libcom_err.so.2 => /lib/libcom_err.so.2 (0x00007feb775b6000)<br /> libz.so.1 => /usr/lib/libz.so.1 (0x00007feb7739f000)<br /> libgnutls.so.13 => /usr/lib/libgnutls.so.13 (0x00007feb7711a000)<br /> liblcms.so.1 => /usr/lib/liblcms.so.1 (0x00007feb76ee6000)<br /> libtiff.so.4 => /usr/lib/libtiff.so.4 (0x00007feb76c8d000)<br /> libjpeg.so.62 => /usr/lib/libjpeg.so.62 (0x00007feb76a6a000)<br /> libfontconfig.so.1 => /usr/lib/libfontconfig.so.1 (0x00007feb76839000)<br /> libXext.so.6 => /usr/lib/libXext.so.6 (0x00007feb76628000)<br /> libXt.so.6 => /usr/lib/libXt.so.6 (0x00007feb763c4000)<br /> libbz2.so.1.0 => /lib/libbz2.so.1.0 (0x00007feb761b4000)<br /> libfreetype.so.6 => /usr/lib/libfreetype.so.6 (0x00007feb75f36000)<br /> libdl.so.2 => /lib/libdl.so.2 (0x00007feb75d32000)<br /> libSM.so.6 => /usr/lib/libSM.so.6 (0x00007feb75b2a000)<br /> libICE.so.6 => /usr/lib/libICE.so.6 (0x00007feb7590f000)<br /> libX11.so.6 => /usr/lib/libX11.so.6 (0x00007feb7560c000)<br /> /lib64/ld-linux-x86-64.so.2 (0x00007feb7c696000)<br /> libsqlite3.so.0 => /usr/lib/libsqlite3.so.0 (0x00007feb753a0000)<br /> libQtSql.so.4 => /usr/lib/libQtSql.so.4 (0x00007feb75160000)<br /> libaudio.so.2 => /usr/lib/libaudio.so.2 (0x00007feb74f47000)<br /> libpng12.so.0 => /usr/lib/libpng12.so.0 (0x00007feb74d22000)<br /> libglib-2.0.so.0 => /usr/lib/libglib-2.0.so.0 (0x00007feb74a62000)<br /> libXi.so.6 => /usr/lib/libXi.so.6 (0x00007feb74859000)<br /> libXrender.so.1 => /usr/lib/libXrender.so.1 (0x00007feb74650000)<br /> libXrandr.so.2 => /usr/lib/libXrandr.so.2 (0x00007feb74449000)<br /> libgthread-2.0.so.0 => /usr/lib/libgthread-2.0.so.0 (0x00007feb74245000)<br /> librt.so.1 => /lib/librt.so.1 (0x00007feb7403c000)<br /> liblber-2.4.so.2 => /usr/lib/liblber-2.4.so.2 (0x00007feb73e2e000)<br /> libresolv.so.2 => /lib/libresolv.so.2 (0x00007feb73c18000)<br /> libsasl2.so.2 => /usr/lib/libsasl2.so.2 (0x00007feb739ff000)<br /> libkrb5support.so.0 => /usr/lib/libkrb5support.so.0 (0x00007feb737f8000)<br /> libkeyutils.so.1 => /lib/libkeyutils.so.1 (0x00007feb735f6000)<br /> libtasn1.so.3 => /usr/lib/libtasn1.so.3 (0x00007feb733e6000)<br /> libgcrypt.so.11 => /lib/libgcrypt.so.11 (0x00007feb73198000)<br /> libexpat.so.1 => /usr/lib/libexpat.so.1 (0x00007feb72f74000)<br /> libXau.so.6 => /usr/lib/libXau.so.6 (0x00007feb72d72000)<br /> libxcb-xlib.so.0 => /usr/lib/libxcb-xlib.so.0 (0x00007feb72b71000)<br /> libxcb.so.1 => /usr/lib/libxcb.so.1 (0x00007feb72956000)<br /> libpcre.so.3 => /usr/lib/libpcre.so.3 (0x00007feb72730000)<br /> libgpg-error.so.0 => /lib/libgpg-error.so.0 (0x00007feb7252d000)<br /> libXdmcp.so.6 => /usr/lib/libXdmcp.so.6 (0x00007feb72328000)<br /></code> | ||
<br />h1. OS X | |||
<br />Use the "otool&quot; command on OS X to show the libraries that are linked to an executable or another shared library: | |||
<br />'''Be aware:''' The libraries are not sorted by name in the output! | |||
<br /><code><br />$ otool -L menubar.app/Contents/MacOS/menubar<br />menubar.app/Contents/MacOS/menubar:<br /> /usr/local/Trolltech/Qt-4.7.0-cocoa/lib/QtSql.framework/Versions/4/QtSql (compatibility version 4.7.0, current version 4.7.0)<br /> /usr/local/Trolltech/Qt-4.7.0-cocoa/lib/QtGui.framework/Versions/4/QtGui (compatibility version 4.7.0, current version 4.7.0)<br /> /usr/local/Trolltech/Qt-4.7.0-cocoa/lib/QtNetwork.framework/Versions/4/QtNetwork (compatibility version 4.7.0, current version 4.7.0)<br /> /usr/local/Trolltech/Qt-4.7.0-cocoa/lib/QtCore.framework/Versions/4/QtCore (compatibility version 4.7.0, current version 4.7.0)<br /> /usr/lib/libstdc.6.dylib (compatibility version 7.0.0, current version 7.9.0)<br /> /usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 625.0.0)<br /> /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 125.2.1)<br /></code> | |||
<br />In case you build universal binaries (one big executable with object code for different architectures like x86, x86_64, ppc) your output might look like this: | |||
<br /><code><br />$ otool -L menubar.app/Contents/MacOS/menubar<br />menubar.app/Contents/MacOS/menubar (architecture i386):<br /> /usr/local/Trolltech/Qt-4.7.0/lib/QtSql.framework/Versions/4/QtSql (compatibility version 4.7.0, current version 4.7.0)<br /> /usr/local/Trolltech/Qt-4.7.0/lib/QtGui.framework/Versions/4/QtGui (compatibility version 4.7.0, current version 4.7.0)<br /> /usr/local/Trolltech/Qt-4.7.0/lib/QtNetwork.framework/Versions/4/QtNetwork (compatibility version 4.7.0, current version 4.7.0)<br /> /usr/local/Trolltech/Qt-4.7.0/lib/QtCore.framework/Versions/4/QtCore (compatibility version 4.7.0, current version 4.7.0)<br /> /usr/lib/libstdc.6.dylib (compatibility version 7.0.0, current version 7.9.0)<br /> /usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 625.0.0)<br /> /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 125.2.1)<br />menubar.app/Contents/MacOS/menubar (architecture ppc):<br /> /usr/local/Trolltech/Qt-4.7.0/lib/QtSql.framework/Versions/4/QtSql (compatibility version 4.7.0, current version 4.7.0)<br /> /usr/local/Trolltech/Qt-4.7.0/lib/QtGui.framework/Versions/4/QtGui (compatibility version 4.7.0, current version 4.7.0)<br /> /usr/local/Trolltech/Qt-4.7.0/lib/QtNetwork.framework/Versions/4/QtNetwork (compatibility version 4.7.0, current version 4.7.0)<br /> /usr/local/Trolltech/Qt-4.7.0/lib/QtCore.framework/Versions/4/QtCore (compatibility version 4.7.0, current version 4.7.0)<br /> /usr/lib/libstdc''+.6.dylib (compatibility version 7.0.0, current version 7.9.0)<br /> /usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 625.0.0)<br /> /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 125.2.1)<br /></code> | |||
The libraries should be the same for every architecture. You can limit the output for one architecture by adding a "-arch&quot; switch to otool: | |||
<code><br />$ otool -L -arch i386 menubar.app/Contents/MacOS/menubar<br /></code> | |||
= Windows = | |||
There is no command line tool for printing the dependencies on Windows. Instead the graphical Dependency Walker tool (depends.exe) is used. The tool was included in Visual Studio until Version 8.0 (aka Visual Studio 2005). It is nowadays downloadable from "http://www.dependencywalker.com.":http://www.dependencywalker.com It does not require any development environment to be installed and runs on Windows 95, 98, Me, NT, 2000, XP, 2003, Vista, and 7. | |||
Loading an application into the dependency walker will show all the different dlls loaded including their folder. Errors are shown for dlls incompatible or not available. However, this process provides also some wrong indications. The screen shot below shows the output when Qt creator application is loaded. This version of Qt creator has been compiled with MinGW 4.6.2 (32 bit). Unfortunately, Depends.exe indicates missing dlls (such as GPSVC.DLL and IESHIMS.DLL). Apparently the list of missing dlls might grow with time due to updates of Windows. Those dlls are typically not on the system, but they are also not required for proper working of the application. This makes it a bit difficult to find other missing dll which need to be made accessible to the application. This may be achieved either by adding the folder of the dll to the environment path or copying to the application's folder. | |||
'''TIP''': press F9 to see the full path of the dll | |||
[[Image:http://db.tt/2t8qYDck|DependsCreator]] | |||
== More detailed checking of dependencies == | |||
==More detailed checking of dependencies== | |||
depends.exe helps to see from where the dlls have been loaded. However, the ultimate test is starting the application executable with a blank environment. | depends.exe helps to see from where the dlls have been loaded. However, the ultimate test is starting the application executable with a blank environment. | ||
Line 41: | Line 45: | ||
Start cmd.exe (the command prompt) | Start cmd.exe (the command prompt) | ||
Type | Type "path&quot;<br />You will probably see some lengthy expression with a lot folders from your PC. If there is one entry with Qt dlls, you might face a mixup. The same for compiler dlls might happen.<br />Type "set path=", which empty the path environment setting.<br />Type "path&quot; will show "PATH=(null)" | ||
Example output:<br /><code><br />Microsoft Windows [Version 6.1.xxxx]<br />Copyright © 2013 Microsoft Corporation. Alle Rechte vorbehalten. | |||
d:gt;path<br />PATH=C:Files\Common Files\Microsoft Shared\Windows Live;c:Files (x86)8.70\bin;c:.8.3_MinGW\bin;c:.8.3_MinG<br />W\lib;C:Files\Common Files\Microsoft Shared\Windows Live;C:32;C:;C:32\Wbem;C:3<br />2\WindowsPowerShell\v1.0C:Files\Intel\DMIX;C:Files (x86);C:Files (x86)Files\Roxio Shared\10<br />.0\DLLSharedC:Files\Common Files\Microsoft Shared\Windows Live;C:Files (x86)Files\Teleca Shared;C:Files<br /> (x86)Leak Detector\bin;C:Files (x86)Files\Roxio Shared\DLLSharedC:Files (x86)2.26.3\bin;C:gram Files\MiKTeX 2.9\miktex\bin\x64C:Files\TortoiseSVN\bin;C:Files (x86); | |||
d:gt;set path= | |||
d:gt;path<br />PATH=(null) | |||
d:gt;<br /></code> |
Revision as of 14:25, 23 February 2015
[toc align_right="yes" depth="2"]
The tools used to detect the libraries an executable or another shared library depends on are highly platform dependend. Find the tools for various systems (and basic usage for some of them) listed below.
Be aware that the tools not necessarily show you all the libraries you need! It's best to separately check the dependency libraries too.
Watch out for plugins, that might pull in further dependencies!
The wiki page Qt_library_cross_dependencies lists some of the cross dependencies of the Qt libraries.
Linux
Linux uses the "ldd" command to show the libraries that are linked to an executable or another shared library:
ldd prints the path to the library and some address after the =>. "not found" is printed in case the library is missing.
Be aware: The libraries are not sorted by name in the output!
<br />$ ldd myFancyProgram<br /> linux-vdso.so.1 => (0x00007fffd6d17000)<br /> libcurl-gnutls.so.4 => /usr/lib/libcurl-gnutls.so.4 (0x00007feb7c45a000)<br /> libMagick+''.so.10 => /usr/lib/libMagick.so.10 (0x00007feb7c1e3000)<br /> libWand.so.10 => /usr/lib/libWand.so.10 (0x00007feb7bf1c000)<br /> libMagick.so.10 => /usr/lib/libMagick.so.10 (0x00007feb7bb25000)<br /> libQtAssistantClient.so.4 => /usr/lib/libQtAssistantClient.so.4 (0x00007feb7b91f000)<br /> libpthread.so.0 => /lib/libpthread.so.0 (0x00007feb7b703000)<br /> libQtWebKit.so.4 => /usr/lib/libQtWebKit.so.4 (0x00007feb7aa8a000)<br /> libQtSvg.so.4 => /usr/lib/libQtSvg.so.4 (0x00007feb7a836000)<br /> libQt3Support.so.4 => /usr/lib/libQt3Support.so.4 (0x00007feb7a30b000)<br /> libQtXml.so.4 => /usr/lib/libQtXml.so.4 (0x00007feb7a0c2000)<br /> libQtGui.so.4 => /usr/lib/libQtGui.so.4 (0x00007feb7955c000)<br /> libQtNetwork.so.4 => /usr/lib/libQtNetwork.so.4 (0x00007feb79253000)<br /> libQtCore.so.4 => /usr/lib/libQtCore.so.4 (0x00007feb78e11000)<br /> libstdc.so.6 => /usr/lib/libstdc.so.6 (0x00007feb78b06000)<br /> libm.so.6 => /lib/libm.so.6 (0x00007feb78885000)<br /> libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x00007feb78677000)<br /> libc.so.6 => /lib/libc.so.6 (0x00007feb78315000)<br /> libidn.so.11 => /usr/lib/libidn.so.11 (0x00007feb780e3000)<br /> libldap_r-2.4.so.2 => /usr/lib/libldap_r-2.4.so.2 (0x00007feb77e9e000)<br /> libgssapi_krb5.so.2 => /usr/lib/libgssapi_krb5.so.2 (0x00007feb77c73000)<br /> libkrb5.so.3 => /usr/lib/libkrb5.so.3 (0x00007feb779dc000)<br /> libk5crypto.so.3 => /usr/lib/libk5crypto.so.3 (0x00007feb777b8000)<br /> libcom_err.so.2 => /lib/libcom_err.so.2 (0x00007feb775b6000)<br /> libz.so.1 => /usr/lib/libz.so.1 (0x00007feb7739f000)<br /> libgnutls.so.13 => /usr/lib/libgnutls.so.13 (0x00007feb7711a000)<br /> liblcms.so.1 => /usr/lib/liblcms.so.1 (0x00007feb76ee6000)<br /> libtiff.so.4 => /usr/lib/libtiff.so.4 (0x00007feb76c8d000)<br /> libjpeg.so.62 => /usr/lib/libjpeg.so.62 (0x00007feb76a6a000)<br /> libfontconfig.so.1 => /usr/lib/libfontconfig.so.1 (0x00007feb76839000)<br /> libXext.so.6 => /usr/lib/libXext.so.6 (0x00007feb76628000)<br /> libXt.so.6 => /usr/lib/libXt.so.6 (0x00007feb763c4000)<br /> libbz2.so.1.0 => /lib/libbz2.so.1.0 (0x00007feb761b4000)<br /> libfreetype.so.6 => /usr/lib/libfreetype.so.6 (0x00007feb75f36000)<br /> libdl.so.2 => /lib/libdl.so.2 (0x00007feb75d32000)<br /> libSM.so.6 => /usr/lib/libSM.so.6 (0x00007feb75b2a000)<br /> libICE.so.6 => /usr/lib/libICE.so.6 (0x00007feb7590f000)<br /> libX11.so.6 => /usr/lib/libX11.so.6 (0x00007feb7560c000)<br /> /lib64/ld-linux-x86-64.so.2 (0x00007feb7c696000)<br /> libsqlite3.so.0 => /usr/lib/libsqlite3.so.0 (0x00007feb753a0000)<br /> libQtSql.so.4 => /usr/lib/libQtSql.so.4 (0x00007feb75160000)<br /> libaudio.so.2 => /usr/lib/libaudio.so.2 (0x00007feb74f47000)<br /> libpng12.so.0 => /usr/lib/libpng12.so.0 (0x00007feb74d22000)<br /> libglib-2.0.so.0 => /usr/lib/libglib-2.0.so.0 (0x00007feb74a62000)<br /> libXi.so.6 => /usr/lib/libXi.so.6 (0x00007feb74859000)<br /> libXrender.so.1 => /usr/lib/libXrender.so.1 (0x00007feb74650000)<br /> libXrandr.so.2 => /usr/lib/libXrandr.so.2 (0x00007feb74449000)<br /> libgthread-2.0.so.0 => /usr/lib/libgthread-2.0.so.0 (0x00007feb74245000)<br /> librt.so.1 => /lib/librt.so.1 (0x00007feb7403c000)<br /> liblber-2.4.so.2 => /usr/lib/liblber-2.4.so.2 (0x00007feb73e2e000)<br /> libresolv.so.2 => /lib/libresolv.so.2 (0x00007feb73c18000)<br /> libsasl2.so.2 => /usr/lib/libsasl2.so.2 (0x00007feb739ff000)<br /> libkrb5support.so.0 => /usr/lib/libkrb5support.so.0 (0x00007feb737f8000)<br /> libkeyutils.so.1 => /lib/libkeyutils.so.1 (0x00007feb735f6000)<br /> libtasn1.so.3 => /usr/lib/libtasn1.so.3 (0x00007feb733e6000)<br /> libgcrypt.so.11 => /lib/libgcrypt.so.11 (0x00007feb73198000)<br /> libexpat.so.1 => /usr/lib/libexpat.so.1 (0x00007feb72f74000)<br /> libXau.so.6 => /usr/lib/libXau.so.6 (0x00007feb72d72000)<br /> libxcb-xlib.so.0 => /usr/lib/libxcb-xlib.so.0 (0x00007feb72b71000)<br /> libxcb.so.1 => /usr/lib/libxcb.so.1 (0x00007feb72956000)<br /> libpcre.so.3 => /usr/lib/libpcre.so.3 (0x00007feb72730000)<br /> libgpg-error.so.0 => /lib/libgpg-error.so.0 (0x00007feb7252d000)<br /> libXdmcp.so.6 => /usr/lib/libXdmcp.so.6 (0x00007feb72328000)<br />
h1. OS X
Use the "otool" command on OS X to show the libraries that are linked to an executable or another shared library:
Be aware: The libraries are not sorted by name in the output!
<br />$ otool -L menubar.app/Contents/MacOS/menubar<br />menubar.app/Contents/MacOS/menubar:<br /> /usr/local/Trolltech/Qt-4.7.0-cocoa/lib/QtSql.framework/Versions/4/QtSql (compatibility version 4.7.0, current version 4.7.0)<br /> /usr/local/Trolltech/Qt-4.7.0-cocoa/lib/QtGui.framework/Versions/4/QtGui (compatibility version 4.7.0, current version 4.7.0)<br /> /usr/local/Trolltech/Qt-4.7.0-cocoa/lib/QtNetwork.framework/Versions/4/QtNetwork (compatibility version 4.7.0, current version 4.7.0)<br /> /usr/local/Trolltech/Qt-4.7.0-cocoa/lib/QtCore.framework/Versions/4/QtCore (compatibility version 4.7.0, current version 4.7.0)<br /> /usr/lib/libstdc.6.dylib (compatibility version 7.0.0, current version 7.9.0)<br /> /usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 625.0.0)<br /> /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 125.2.1)<br />
In case you build universal binaries (one big executable with object code for different architectures like x86, x86_64, ppc) your output might look like this:
<br />$ otool -L menubar.app/Contents/MacOS/menubar<br />menubar.app/Contents/MacOS/menubar (architecture i386):<br /> /usr/local/Trolltech/Qt-4.7.0/lib/QtSql.framework/Versions/4/QtSql (compatibility version 4.7.0, current version 4.7.0)<br /> /usr/local/Trolltech/Qt-4.7.0/lib/QtGui.framework/Versions/4/QtGui (compatibility version 4.7.0, current version 4.7.0)<br /> /usr/local/Trolltech/Qt-4.7.0/lib/QtNetwork.framework/Versions/4/QtNetwork (compatibility version 4.7.0, current version 4.7.0)<br /> /usr/local/Trolltech/Qt-4.7.0/lib/QtCore.framework/Versions/4/QtCore (compatibility version 4.7.0, current version 4.7.0)<br /> /usr/lib/libstdc.6.dylib (compatibility version 7.0.0, current version 7.9.0)<br /> /usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 625.0.0)<br /> /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 125.2.1)<br />menubar.app/Contents/MacOS/menubar (architecture ppc):<br /> /usr/local/Trolltech/Qt-4.7.0/lib/QtSql.framework/Versions/4/QtSql (compatibility version 4.7.0, current version 4.7.0)<br /> /usr/local/Trolltech/Qt-4.7.0/lib/QtGui.framework/Versions/4/QtGui (compatibility version 4.7.0, current version 4.7.0)<br /> /usr/local/Trolltech/Qt-4.7.0/lib/QtNetwork.framework/Versions/4/QtNetwork (compatibility version 4.7.0, current version 4.7.0)<br /> /usr/local/Trolltech/Qt-4.7.0/lib/QtCore.framework/Versions/4/QtCore (compatibility version 4.7.0, current version 4.7.0)<br /> /usr/lib/libstdc''+.6.dylib (compatibility version 7.0.0, current version 7.9.0)<br /> /usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 625.0.0)<br /> /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 125.2.1)<br />
The libraries should be the same for every architecture. You can limit the output for one architecture by adding a "-arch" switch to otool:
<br />$ otool -L -arch i386 menubar.app/Contents/MacOS/menubar<br />
Windows
There is no command line tool for printing the dependencies on Windows. Instead the graphical Dependency Walker tool (depends.exe) is used. The tool was included in Visual Studio until Version 8.0 (aka Visual Studio 2005). It is nowadays downloadable from "http://www.dependencywalker.com.%22:http://www.dependencywalker.com It does not require any development environment to be installed and runs on Windows 95, 98, Me, NT, 2000, XP, 2003, Vista, and 7.
Loading an application into the dependency walker will show all the different dlls loaded including their folder. Errors are shown for dlls incompatible or not available. However, this process provides also some wrong indications. The screen shot below shows the output when Qt creator application is loaded. This version of Qt creator has been compiled with MinGW 4.6.2 (32 bit). Unfortunately, Depends.exe indicates missing dlls (such as GPSVC.DLL and IESHIMS.DLL). Apparently the list of missing dlls might grow with time due to updates of Windows. Those dlls are typically not on the system, but they are also not required for proper working of the application. This makes it a bit difficult to find other missing dll which need to be made accessible to the application. This may be achieved either by adding the folder of the dll to the environment path or copying to the application's folder.
TIP: press F9 to see the full path of the dll
More detailed checking of dependencies
depends.exe helps to see from where the dlls have been loaded. However, the ultimate test is starting the application executable with a blank environment.
Start cmd.exe (the command prompt)
Type "path"
You will probably see some lengthy expression with a lot folders from your PC. If there is one entry with Qt dlls, you might face a mixup. The same for compiler dlls might happen.
Type "set path=", which empty the path environment setting.
Type "path" will show "PATH=(null)"
Example output:
<br />Microsoft Windows [Version 6.1.xxxx]<br />Copyright © 2013 Microsoft Corporation. Alle Rechte vorbehalten.
d:gt;path<br />PATH=C:Files\Common Files\Microsoft Shared\Windows Live;c:Files (x86)8.70\bin;c:.8.3_MinGW\bin;c:.8.3_MinG<br />W\lib;C:Files\Common Files\Microsoft Shared\Windows Live;C:32;C:;C:32\Wbem;C:3<br />2\WindowsPowerShell\v1.0C:Files\Intel\DMIX;C:Files (x86);C:Files (x86)Files\Roxio Shared\10<br />.0\DLLSharedC:Files\Common Files\Microsoft Shared\Windows Live;C:Files (x86)Files\Teleca Shared;C:Files<br /> (x86)Leak Detector\bin;C:Files (x86)Files\Roxio Shared\DLLSharedC:Files (x86)2.26.3\bin;C:gram Files\MiKTeX 2.9\miktex\bin\x64C:Files\TortoiseSVN\bin;C:Files (x86);
d:gt;set path=
d:gt;path<br />PATH=(null)
d:gt;<br />