• 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: search paths
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: search paths


  • Subject: Re: search paths
  • From: Steve Mills <email@hidden>
  • Date: Sun, 3 Apr 2005 00:32:07 -0600

On Apr 2, 2005, at 03:46, Chris Espinosa <email@hidden> wrote:

So let me get this straight, as there may be an interesting bug here:

- you have a .pch file that's your prefix
- you have Precompile Prefix Header checked
- your prefix file has an #include <string>

Correct, except I think it was a .h file that has #include <string> and the .pch file #includes that .h file.


What target template did you use to create the target (or project and
its default target)?  It could be that you started with a C project
and you're trying to use C++ in a C project without telling the
compiler that.

It was an early version of the Spotlight Importer template (which I'm guessing is a C template), looks like it was from whatever build I would've had on 2004/10/28. <string> was not #included in that .h file back then, but appeared recently. (The .h file is in our framework, so it's used in almost every other project.) When I went to make a current build of the importer with 8a425 (or maybe the one before that), it puked on <string>.


gcc is generally stricter about applying standards-based
interpretation to your files than CodeWarrior is.  CW lets you use C+
+isms in .c files pretty freely, where in gcc if you call a file ".c"
it trusts you mean C, not C++.

But it could well be that in absence of any guidance, gcc takes
a .pch file and defaults it to C, which wouldn't necessarily be the
best assumption.  I'll check on that.

OK. I also tried copying the .pch file to a .pch++ file, hoping that would help. I don't know if gcc knows about that extension.


Steve Mills
Drummer, Mac geek
http://sjmills5.home.mchsi.com/

_______________________________________________
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


  • Prev by Date: Re: How do I view contents of a simple C buffer in XCode debugger?
  • Next by Date: Newbie Question
  • Previous by thread: Re: search paths
  • Next by thread: Re: Link to netinfo
  • Index(es):
    • Date
    • Thread