• 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: Chris Espinosa <email@hidden>
  • Date: Fri, 1 Apr 2005 17:29:48 -0800

On Apr 1, 2005, at 2:13 PM, Steve Mills wrote:

One thing I tried was setting the target's "Compile Source As" setting to C++ instead of "According to file suffix". That fixed the problem of it not finding <string>.


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>

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.

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.

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

  • Follow-Ups:
    • Re: search paths
      • From: Andreas Grosam <email@hidden>
References: 
 >Re: search paths (From: Steve Mills <email@hidden>)

  • Prev by Date: Re: XCode and gcc - adding include directories
  • Next by Date: How do I view contents of a simple C buffer in XCode debugger?
  • Previous by thread: Re: search paths
  • Next by thread: Re: search paths
  • Index(es):
    • Date
    • Thread