On Feb 23, 2006, at 17:39 , Mark Lucas wrote: Thanks for the help, I've also been reading up on a qt doc for using otool and install_name_tool to fix things:
Now your playing with fire!!!!!
Are you specifying relative paths???
If your not then your application will only run when placed in a specific directory (not recommended).
So to summarize, since I'm trying to use the make file systems and build with an external make target (these are rapidly evolving, projects with embedded scripts), ideally, I need to modify the install location to @executable_path/../Frameworks. Question 1, can't I just reach in with a Copy files phase and copy the resultant dylibs into that location once the makefile installs in its internal default?
Fix your script to use relative paths. Question 2, Once I have the dylibs at the correct location. I'm not clear on the correct way to link to the bundle location. Do I have to explicitly provide -l@executable_path/../Frameworks/osgPlanet.dylib ? I've tried dragging into the link phase (from the copy phase (which moves them), from the external libs (which links externally - not what I want).
This is the wrong method, the one you want will depend on several other issues that have yet to be addressed. Again, appreciate all of the help, I think I'm starting to make forward progress again instead of just moving files back and forth around xcode...
Stop and slow down, I realize you are having a problem however, you have more than one issue which is contributing to your problem and they all need to be addressed.
Provide the output of otool -L on one of these frameworks, I'm really interested to see what you did.
Actually, build the application as deployment, tar,gz the application and send it to me off list (it doesn't have to work for me but does need to be built this way to examine it's true structure) Mark On Feb 23, 2006, at 5:01 PM, Dave Thorup wrote: On Feb 23, 2006, at 3:51 PM, D. Walsh wrote:
running otool -L on the executable within the bundle yields:
mrl$ otool -L ossimosgqt ossimosgqt: libosgPlanet.dylib (compatibility version 1.0.0, current version 1.0.0) libosgGA.dylib (compatibility version 1.0.0, current version 1.0.0) libosgDB.dylib (compatibility version 1.0.0, current version 1.0.0) libosgUtil.dylib (compatibility version 1.0.0, current version 1.0.0) libosg.dylib (compatibility version 1.0.0, current version 1.0.0) libProducer.dylib (compatibility version 0.0.0, current version 0.0.0) libosgText.dylib (compatibility version 1.0.0, current version 1.0.0) libosgProducer.dylib (compatibility version 1.0.0, current version 1.0.0) /System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL (compatibility version 1.0.0, current version 1.0.0) /Users/Shared/Development/ossim/lib/libossim.1.6.5.dylib (compatibility version 0.0.0, current version 0.0.0) libOpenThreads.dylib (compatibility version 0.0.0, current version 0.0.0) libwms.dylib (compatibility version 1.0.0, current version 1.0.0) libqt.3.dylib (compatibility version 3.3.0, current version 3.3.6) /usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 7.3.0) /usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 1.0.0)
Those libs are in app/Contents/Frameworks however.
According to your build settings those file are stored with the the main app but your copy phase is placing them in the assigned Frameworks directory.
What D. Walsh is saying is that your application is looking for your dynamic libraries in the Contents/MacOS/ part of the bundle, not in Contents/Frameworks. If you want to put the dynamic libraries in Contents/Frameworks then you need to build each library with an "Installation Directory" (INSTALL_PATH) of "@executable_path/../Frameworks".
So your otool output should look like this (not complete):
@executable_path/../Frameworks/libosgPlanet.dylib (compatibility version 1.0.0, current version 1.0.0) @executable_path/../Frameworks/libosgGA.dylib (compatibility version 1.0.0, current version 1.0.0) @executable_path/../Frameworks/libosgDB.dylib (compatibility version 1.0.0, current version 1.0.0) @executable_path/../Frameworks/libosgUtil.dylib (compatibility version 1.0.0, current version 1.0.0) @executable_path/../Frameworks/libosg.dylib (compatibility version 1.0.0, current version 1.0.0) @executable_path/../Frameworks/libProducer.dylib (compatibility version 0.0.0, current version 0.0.0) @executable_path/../Frameworks/libosgText.dylib (compatibility version 1.0.0, current version 1.0.0) @executable_path/../Frameworks/libosgProducer.dylib (compatibility version 1.0.0, current version 1.0.0)
I also see an issue with "/Users/Shared/Development/ossim/lib/libossim.1.6.5.dylib" making it almost impossible for the application to be used outside of this drive if the library doesn't exists.
Yes, this too will be a problem and you'll need to change it's INSTALL_PATH to be "@executable_path/../Frameworks" as well.
In the end, this "/Users/Shared/Development/ossim/lib/libossim.1.6.5.dylib (compatibility version 0.0.0, current version 0.0.0)" will look like "./../Frameworks//libossim.1.6.5.dylib (compatibility version 0.0.0, current version 0.0.0)" as well as any frameworks you're building with this project when you get it worked out.
-- Dale
|