• 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: Dumb include path/groups/folder references problem
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Dumb include path/groups/folder references problem


  • Subject: Re: Dumb include path/groups/folder references problem
  • From: Matthias Juwan <email@hidden>
  • Date: Mon, 4 Oct 2004 23:18:06 +0200

Hi,

please, can any of the experts comment on this? I have a similar problem here with string.h. I solved it for now by including the standard string.h with an absolute path...

#include </usr/include/string.h>

...and my private one something like...

#include "mylib/whatever/string.h"

I did not set any extra search paths, except "../.." to be in my development root folder. I played around a while with "-I-" GCC option, but no luck so far.

Regards,

Matthias


On Oct 2, 2004, at 5:14 PM, George van den Driessche wrote:

Hi,

I'm trying to bring some code originally developed under Windows across to OSX, using XCode 1.5. There is a main target project and a couple of libraries; here's a subset:

Library A
---------
g
+-cont
+-string.h

Executable B
------------
(Depends on Library A)
main.cpp:
#include <Carbon/Carbon.h>
#include <g/cont/string.h>
...

I've set up a Source Tree path to point to Library A. I created a target for the executable and added Library A's path to the External Frameworks and Libraries group.

Now, when I try to compile main.cpp, something from within Carbon.h is trying to include <String.h> (i.e. the standard C library header) but is instead picking up g/cont/string.h. This happens regardless of whether Library A is referenced using an absolute path or the Source Tree path I set up. Is this the same problem that used to exist in CodeWarrior, where specifying an include path meant recursively specifying every subdirectory in it? If so, how does one solve it?

I tried adding folder references for Library A instead of groups, but then I find that main.cpp can't find g/cont/string.h at all.

I think that in short my question is: how can I reference Library A from Executable B in such a way that
#include <g/cont/string.h>
works, and
#include <string.h>
includes the standard library header and not g/cont/string.h?

I've searched the XCode documentation for several hours on this topic, and Google too, and I've found nothing on the subject. Maybe I should switch to Eclipse...

Many thanks,
George

_______________________________________________
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

References: 
 >Dumb include path/groups/folder references problem (From: George van den Driessche <email@hidden>)

  • Prev by Date: Re: <conio.h> and system ("cls")
  • Next by Date: Re: <conio.h> and system ("cls")
  • Previous by thread: Dumb include path/groups/folder references problem
  • Next by thread: XCode makes easy things hard...
  • Index(es):
    • Date
    • Thread