Re: On Building and Using DYLIB (Xcode 3, Leopard)
Re: On Building and Using DYLIB (Xcode 3, Leopard)
- Subject: Re: On Building and Using DYLIB (Xcode 3, Leopard)
- From: "Kyle Sluder" <email@hidden>
- Date: Sat, 3 Nov 2007 11:07:23 +0000
Depending on how related the dylib and the dylib-consumer are, you may
even want to put them in the same project. That avoids the issue
altogether.
--Kyle Sluder
On 11/3/07, Chris Espinosa <email@hidden> wrote:
>
>
> 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
>
_______________________________________________
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