Re: Include order in XCode 2.0
Re: Include order in XCode 2.0
- Subject: Re: Include order in XCode 2.0
- From: Chris Espinosa <email@hidden>
- Date: Thu, 19 May 2005 11:03:15 -0700
On May 19, 2005, at 9:29 AM, Dieter Oberkofler wrote: One of my 3rd party libraries offers a header file named tk.h that when running under XCode 1.5 was correctly included by specifying the appropriate include path in the Target settings.
After moving to XCode 2.0 not the needed tk.h include but a tk.h header file that seems to be part of an X11 api is included.
Typically this problem can be solved by using a specific order of where includes are searched for but I cannot figure out how to get this to work under XCode.
Jim Ingham answered this question for you yesterday:
This is a Tiger issue, not an Xcode issue. Tiger includes an Aqua native version of Tk, Panther did not. The headers for this are in / System/Library/Frameworks. However, if you are NOT using the framework include form, i.e. if you are using
#include "tk.h"
rather than:
#include <Tk/tk.h>
then you shouldn't be picking up the ones in the Tk framework. So you should check to make sure you aren't using the Framework form of the headers if you don't want to find the Aqua version of the headers. I guess somebody could also be doing:
-I/System/Library/Frameworks/Tk.framework/Headers
That would also not be a good idea if you want to use the X11 version of the Tk headers.
Note: tk.h is NOT a part of the X11 headers, but on Mac OS X you can EITHER build the Aqua native Tk which links against Carbon, OR the X11 version which links against the xlib, etc... We've actually made sure that both versions of Tk can co-exist peacefully on the same Tiger install. So you just have to make sure your includes or -I's aren't inadvertently picking up the version you don't intend to link to.
Trying to resolve header include issues by altering include paths is inherently fragile. You should address the root cause (in this case, it's case-sensiitivity in the filename combined with two different X11 header sets in the Tiger distribution).
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