Re: [Q] same library in different places?
Re: [Q] same library in different places?
- Subject: Re: [Q] same library in different places?
- From: JongAm Park <email@hidden>
- Date: Thu, 31 Aug 2006 23:23:39 -0700
Hello~
Thank you for your answer, but it is still strange.
When I debug it, it jumps into some machine code area when it reaches a
function defined in the library.
However, if I link the one under /usr/lib, there is no problem at all.
So, it doesn't seem to invoke proper dynamic library under /usr/lib when
a program is linked with a library file with the same name under the SDK
directory.
Additionally, I found something different visual clue with the Xcode.
If you add the library file under the SDK directory by clicking the
"Link Binary with" under the Target group,
the Xcode displays the library file under the project group, which is on
the top of the list of groups.
However, if you add the library file under /usr/lib, the Xcode displays
it under the "Link Binary With" phase also.
And at this time, it doesn't give any problem.
These behaviour of the Xcode is not documented. I didn't find
information about this different behaviour from the Xcode guide document.
I think the Xcode needs better visual feedback for notifying users that
the user's action is right or not.
I reported this issue to the Bug Report page.
Thank you.
P.S. Probably this issue is not shown up if you create a Cocoa app
project. The project type I used here is the C++ tool.
I
Shawn Erickson wrote:
>
> On Aug 31, 2006, at 10:37 PM, JongAm Park wrote:
>
>> Hello.
>>
>> I have been curious about this, but never known exact reason. Can anyone
>> explain this to me?
>> Under MacOSX10.4u.sdk/usr/lib/, there is a libiconv.dylib.
>>
>> Also, under /usr/lib, there is a same file.
>>
>> In the Xcode project setting, default SDK path is set as the SDK
>> directory.
>> Then, are the dylibs linked in SDK used in runtime? or are the ones in
>> the /usr/lib used?
>
> The SDKs contain stub libraries (and frameworks) related to that
> version of the operating system. When your code is compiled and linked
> it is linked using information from those stubs but when you
> application is run it is dynamically linked against the ones under
> /usr/lib, etc.
>
> SDKs are not used when your application runs (for one only systems
> with the developer tools have them).
>
> -Shawn
>
_______________________________________________
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