Xcode implicitly uses includes of frameworks which are not linked?
Xcode implicitly uses includes of frameworks which are not linked?
- Subject: Xcode implicitly uses includes of frameworks which are not linked?
- From: Thijs Koerselman <email@hidden>
- Date: Thu, 10 Jun 2010 15:29:36 +0200
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?
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