• 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: Xcode implicitly uses includes of frameworks which are not linked?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Xcode implicitly uses includes of frameworks which are not linked?


  • Subject: Re: Xcode implicitly uses includes of frameworks which are not linked?
  • From: Thijs Koerselman <email@hidden>
  • Date: Thu, 10 Jun 2010 20:21:58 +0200

On Thu, Jun 10, 2010 at 7:36 PM, Chris Espinosa <email@hidden> wrote:
>
> On Jun 10, 2010, at 6:29 AM, Thijs Koerselman wrote:
>
>> I build a framework from an open source library a while ago, say
>> Foo.framework. I completely forgot about that, because I decided that
>> it wasn't worth the effort and I continued to work with the standard
>> libraries that were build out of the box with the supplied CMake
>> system.
>>
>> So here I am linking to the installed library in /usr/local/lib and
>> its headers in /usr/local/include/foo, when I was getting weird memory
>> corruptions and such. The debugger always pointed me to some sensible
>> place in the code but I couldn't figure out why it was happening. Then
>> I discovered that if I pointed Xcode explicitly to the include
>> directory everything build fine. I tried to remove that include
>> directory, and my application still build. That's where I started to
>> get suspicious:)
>>
>> It turned out that Xcode was, by default, looking in
>> /Library/Frameworks first for header files, before looking at
>> /usr/local/include/foo. The effect is that my application was using
>> the old include files from Foo.framework, while linking to the correct
>> library in /usr/local/lib.
>>
>> So with a statement like:
>> #include <foo/someheader.h>
>>
>> Xcode looks in /Library/Frameworks/Foo.framework first before checking
>> /usr/local/include/foo. I think it is rather nasty, that even when I
>> don't link to a framework explicitly Xcode is still looking for
>> include files there.
>>
>> Or am I just missing something?
>
> Please post the full text of the "Linking" line (just drag and drop it from the Build Results window) so we can see what's actually happening.  Xcode should not put a framework into your search paths if you're not actually linking to that framework.
>
> Chris


Oeps I threw the framework away already. I'll try to recreate the error somehow.

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

References: 
 >Xcode implicitly uses includes of frameworks which are not linked? (From: Thijs Koerselman <email@hidden>)
 >Re: Xcode implicitly uses includes of frameworks which are not linked? (From: Chris Espinosa <email@hidden>)

  • Prev by Date: Re: Creating a Resource Folder in Bundle
  • Next by Date: "symbols hidden by default" causing runtime crashes
  • Previous by thread: Re: Xcode implicitly uses includes of frameworks which are not linked?
  • Next by thread: Creating a Resource Folder in Bundle
  • Index(es):
    • Date
    • Thread