Hi,<br><br>I wrote a Qt application with cmake building procedure for my OSX 10.5.8 + Qt 4.8 system.<br>I must build it with <br>set(CMAKE_OSX_ARCHITECTURES x86_64)<br><br>in order to correctly link Qt libraries.<br>When I move my Foo.app bundle on another computer I can't get it to work.<br>
I get<br><br><i>dyld: Library not loaded QtCore.framework/Versions/4/QtCore<br>Reason not suitable image found. Did find:<br> /Library/Frameworks/QtCore.frameworks/Versions/4/QtCore: mach-o but wrong architecture</i><br>
<br>The very same thing appears conversely when from a OSX 10.5.8 system with Qt 4.6.3 I move the application bundle to my system.<br><br>I installed Qt from QtSDK installer.<br><br>In order to understand if something is wrong in my CMakeLists.txt I used the example QtTest.zip documented at <br>
<a href="http://www.cmake.org/Wiki/BundleUtilitiesExample" target="_blank">http://www.cmake.org/Wiki/BundleUtilitiesExample</a><br>
<div><br></div><div>After I set as always CMAKE_OSX_ARCHITECTURES to x86_64 (don't know why because I didn't speficied anything during Qt installation but it appears that I only have 64 bit version of it), I compiled it as usual</div>
<div>cmake .</div><div>make</div><div><br></div><div>and then </div><div>cpack -G DragNDrop CPackConfig.cmake</div><div><br></div><div>in order to create a package with hopefully all its dependencies, but I got the following errors</div>
<div><br></div><div><div><i>CPack: Create package using DragNDrop</i></div><div><i>CPack: Install projects</i></div><div><i>CPack: - Run preinstall target for: QtTest</i></div><div><i>CPack: - Install project: QtTest</i></div>
<div><i>install_name_tool: object: /Users/rs/Downloads/QtTest/_CPack_Packages/Darwin/DragNDrop/QtTest-0.1.1-Darwin/QtTest.app/Contents/MacOS/plugins/imageformats/libqgif.dylib malformed object (unknown load command 5)</i></div>
<div><i>install_name_tool: object: /Users/rs/Downloads/QtTest/_CPack_Packages/Darwin/DragNDrop/QtTest-0.1.1-Darwin/QtTest.app/Contents/Frameworks/QtCore.framework/Versions/4/QtCore malformed object (unknown load command 5)</i></div>
<div><i>install_name_tool: object: /Users/rs/Downloads/QtTest/_CPack_Packages/Darwin/DragNDrop/QtTest-0.1.1-Darwin/QtTest.app/Contents/Frameworks/QtGui.framework/Versions/4/QtGui malformed object (unknown load command 5)</i></div>
<div><i>install_name_tool: object: /Users/rs/Downloads/QtTest/_CPack_Packages/Darwin/DragNDrop/QtTest-0.1.1-Darwin/QtTest.app/Contents/MacOS/plugins/imageformats/libqgif_debug.dylib malformed object (unknown load command 5)</i></div>
<div><i>install_name_tool: object: /Users/rs/Downloads/QtTest/_CPack_Packages/Darwin/DragNDrop/QtTest-0.1.1-Darwin/QtTest.app/Contents/MacOS/plugins/imageformats/libqico.dylib malformed object (unknown load command 5)</i></div>
<div><i>install_name_tool: object: /Users/rs/Downloads/QtTest/_CPack_Packages/Darwin/DragNDrop/QtTest-0.1.1-Darwin/QtTest.app/Contents/MacOS/plugins/imageformats/libqico_debug.dylib malformed object (unknown load command 5)</i></div>
<div><i>install_name_tool: object: /Users/rs/Downloads/QtTest/_CPack_Packages/Darwin/DragNDrop/QtTest-0.1.1-Darwin/QtTest.app/Contents/MacOS/plugins/imageformats/libqjpeg.dylib malformed object (unknown load command 5)</i></div>
<div><i>install_name_tool: object: /Users/rs/Downloads/QtTest/_CPack_Packages/Darwin/DragNDrop/QtTest-0.1.1-Darwin/QtTest.app/Contents/MacOS/plugins/imageformats/libqjpeg_debug.dylib malformed object (unknown load command 5)</i></div>
<div><i>install_name_tool: object: /Users/rs/Downloads/QtTest/_CPack_Packages/Darwin/DragNDrop/QtTest-0.1.1-Darwin/QtTest.app/Contents/MacOS/plugins/imageformats/libqmng.dylib malformed object (unknown load command 5)</i></div>
<div><i>install_name_tool: object: /Users/rs/Downloads/QtTest/_CPack_Packages/Darwin/DragNDrop/QtTest-0.1.1-Darwin/QtTest.app/Contents/MacOS/plugins/imageformats/libqmng_debug.dylib malformed object (unknown load command 5)</i></div>
<div><i>install_name_tool: object: /Users/rs/Downloads/QtTest/_CPack_Packages/Darwin/DragNDrop/QtTest-0.1.1-Darwin/QtTest.app/Contents/MacOS/plugins/imageformats/libqsvg.dylib malformed object (unknown load command 5)</i></div>
<div><i>install_name_tool: object: /Users/rs/Downloads/QtTest/_CPack_Packages/Darwin/DragNDrop/QtTest-0.1.1-Darwin/QtTest.app/Contents/Frameworks/QtSvg.framework/Versions/4/QtSvg malformed object (unknown load command 5)</i></div>
<div><i>install_name_tool: object: /Users/rs/Downloads/QtTest/_CPack_Packages/Darwin/DragNDrop/QtTest-0.1.1-Darwin/QtTest.app/Contents/Frameworks/QtXml.framework/Versions/4/QtXml malformed object (unknown load command 5)</i></div>
<div><i>install_name_tool: object: /Users/rs/Downloads/QtTest/_CPack_Packages/Darwin/DragNDrop/QtTest-0.1.1-Darwin/QtTest.app/Contents/MacOS/plugins/imageformats/libqsvg_debug.dylib malformed object (unknown load command 5)</i></div>
<div><i>install_name_tool: object: /Users/rs/Downloads/QtTest/_CPack_Packages/Darwin/DragNDrop/QtTest-0.1.1-Darwin/QtTest.app/Contents/MacOS/plugins/imageformats/libqtga.dylib malformed object (unknown load command 5)</i></div>
<div><i>install_name_tool: object: /Users/rs/Downloads/QtTest/_CPack_Packages/Darwin/DragNDrop/QtTest-0.1.1-Darwin/QtTest.app/Contents/MacOS/plugins/imageformats/libqtga_debug.dylib malformed object (unknown load command 5)</i></div>
<div><i>install_name_tool: object: /Users/rs/Downloads/QtTest/_CPack_Packages/Darwin/DragNDrop/QtTest-0.1.1-Darwin/QtTest.app/Contents/MacOS/plugins/imageformats/libqtiff.dylib malformed object (unknown load command 5)</i></div>
<div><i>install_name_tool: object: /Users/rs/Downloads/QtTest/_CPack_Packages/Darwin/DragNDrop/QtTest-0.1.1-Darwin/QtTest.app/Contents/MacOS/plugins/imageformats/libqtiff_debug.dylib malformed object (unknown load command 5)</i></div>
<div><i>CMake Error at /Applications/CMake 2.8-7.app/Contents/share/cmake-2.8/Modules/BundleUtilities.cmake:784 (message):</i></div><div><i> error: verify_app failed</i></div><div><i>Call Stack (most recent call first):</i></div>
<div><i> /Applications/CMake 2.8-7.app/Contents/share/cmake-2.8/Modules/BundleUtilities.cmake:666 (verify_app)</i></div><div><i> /Users/rs/Downloads/QtTest/cmake_install.cmake:49 (fixup_bundle)</i></div><div><i>CPack Error: Error when generating package: QtTest</i></div>
</div><div><br></div><div><br></div><div>Now I would like to understand how is possible (if it is) to deploy a Qt application with cmake</div><div><br></div><div>INFO</div><div>cmake version 2.8.7</div><div>OSX 10.5.8</div>
<div>Qt 4.8.1</div><div><br></div><div>Thanks for your support!</div><br clear="all"><div><br></div>-- <br>Carlo Nicolini<br>LION Laboratory (Machine Learning and Intelligent Optimization)<br>DISI - Dipartimento di Scienza ed Ingegneria dell'Informazione<br>
Universita' di Trento<br>Via Sommarive, 14<br>38100 Trento (Italy)<br>......................................................................<br>web sites:<br><a href="http://disi.unitn.it/~nicolini/">http://disi.unitn.it/~nicolini/</a> - personal<br>
<a href="http://www.intelligent-optimization.org/">http://www.intelligent-optimization.org/</a><br><a href="http://www.reactive-search.org/">http://www.reactive-search.org/</a><br><br>