• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Problems linking to dylibs in bundle
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Problems linking to dylibs in bundle


  • Subject: Re: Problems linking to dylibs in bundle
  • From: Dave Thorup <email@hidden>
  • Date: Thu, 23 Feb 2006 17:01:32 -0500

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.
_____________________________


Dave Thorup
Software Engineer
email@hidden

http://www.kuwan.net
HyperSpell - Check spelling in Mac OS X from any application.


_______________________________________________ Do not post admin requests to the list. They will be ignored. Xcode-users mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
  • Follow-Ups:
    • Re: Problems linking to dylibs in bundle
      • From: Mark Lucas <email@hidden>
References: 
 >Problems linking to dylibs in bundle (From: Mark Lucas <email@hidden>)
 >Re: Problems linking to dylibs in bundle (From: "D. Walsh" <email@hidden>)

  • Prev by Date: Re: Problems linking to dylibs in bundle
  • Next by Date: Re: Problems linking to dylibs in bundle
  • Previous by thread: Re: Problems linking to dylibs in bundle
  • Next by thread: Re: Problems linking to dylibs in bundle
  • Index(es):
    • Date
    • Thread