• 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: On Building and Using DYLIB (Xcode 3, Leopard)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: On Building and Using DYLIB (Xcode 3, Leopard)


  • Subject: Re: On Building and Using DYLIB (Xcode 3, Leopard)
  • From: Chris Espinosa <email@hidden>
  • Date: Fri, 2 Nov 2007 20:48:31 -0700


On Nov 2, 2007, at 8:25 PM, Phil Hystad wrote:

OK, I am stumped.


I have two projects.  One builds a dynamic link library and the other uses that dynamic link library.


Earlier today I deployed the dynamic link library to /usr/local/lib and that was OK.  But, later today I had to rebuild the library and decided to reference the library directly from its project file location rather then /usr/local/lib.


So, I put the dynamic link library in my other project (the one that uses it) by moving it from one project window to the another.  This seamed to work fine as I checked the references and they were correct, pointing to the proper location for the "debug" build of my dynamic link library which is the one I want to use.


But, now when I run my test program, the second project that uses the DYLIB, it fails because it can't find the library in /usr/local/lib.  However, all my references point to the library project and also the search paths in the build settings are pointing to my other dynamic library project as they should.


So, is there a reason why I cannot reference a dynamic link library from a project file.  Does it have to be deployed to /usr/local/lib.  And, if this is the case, what do you guys do to get over the permissions problem without having to run under root or mess up the permissions on /usr/local/lib.


There are two places you can refer to a build product of another project or target in a given target:

• A known location on disk by absolute path (like /usr/local/lib)
• A build folder commonly shared by both projects.

The general way to do this is to set (in Xcode > Preferences > Building) a common Objects directory.  You don't have to have a common Intermediates directory, just Objects.  Then build the dylib.  When it's built, drag it from the Build Directory in the Finder into the app project.  Don't drag it directly from one project to the other.

You'll notice that your build products are segregated by configuration in the build directory.  That's OK; Xcode will fix up the references so that even if you drag in the Debug version, your Release application will know to use the Release version of the dylib.

Chris
 _______________________________________________
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: On Building and Using DYLIB (Xcode 3, Leopard)
      • From: "Kyle Sluder" <email@hidden>
References: 
 >On Building and Using DYLIB (Xcode 3, Leopard) (From: Phil Hystad <email@hidden>)

  • Prev by Date: Re: moving through bookmarks
  • Next by Date: Project template won't macro expand NIB files
  • Previous by thread: On Building and Using DYLIB (Xcode 3, Leopard)
  • Next by thread: Re: On Building and Using DYLIB (Xcode 3, Leopard)
  • Index(es):
    • Date
    • Thread