• 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
how to compile dylibs from the command line
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

how to compile dylibs from the command line


  • Subject: how to compile dylibs from the command line
  • From: Michael Wild <email@hidden>
  • Date: Wed, 30 May 2007 15:10:11 +0200

Hi all

I'm not quite sure whether this is the right place to ask. If not, please try to help me nonetheless ;-) or refer me to where this question belongs...


Say I've got a project which comprises several dynamic libraries, e.g.:

folderA/libA.dylib
folderB/libB.dylib
folderC/libC.dylib

Now, libA.dylib links against libA.dylib, and libC.dylib against libB.dylib. All that stuff works perfectly fine, until I try to install/copy the libraries into a different place, say ~/lib. Then things break down, because libB.dylib can't find folderA/libA.dylib, and libC.dylib can't find folderB/libB.dylib.

Ok, I read the man pages, and come up with the linking option -dylib_install_name, which I set to ~/lib for all three of the libraries. That works fine for building libA.dylib, and also folderB.dylib links. However, when I try to link libC.dylib things break, because the linker says it can't find ~/lib/libA.dylib referenced from folderB/libB.dylib, which is perfectly true, because things have not been installed just yet!


I can't seem to come up with a solution for that problem, except avoiding a link-chain which is longer than two elements. Of course, I might also use install_name_tool to change the install name of the libs when installing them, but that seems to be some hack to be, and also requires additional link flags to make things work.



I know that I could solve the problem using GNU libtool, but I'd prefer not to...



Any ideas?

Thanks for the help

Michael
_______________________________________________
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


  • Prev by Date: Multiline regular experesisions
  • Next by Date: File Paths for dylibs
  • Previous by thread: Re: Multiline regular experesisions
  • Next by thread: File Paths for dylibs
  • Index(es):
    • Date
    • Thread