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

Re: Build failure


  • Subject: Re: Build failure
  • From: Alastair Houghton <email@hidden>
  • Date: Thu, 20 Sep 2007 12:08:24 +0100

On 20 Sep 2007, at 11:59, Apparao wrote:

On Sep 20, 2007, at 3:03 PM, Alastair Houghton wrote:

If not, try adding #include <cstring> to the file where you're seeing the problem. If that works, there's a problem with your prefix header (e.g. perhaps you're only #including <cstring> if the code is Objective-C?)

cstring is already included in the corresponding C++ files exists at /Developer/SDKs/MacOSX10.4u.sdk/usr/include/c++/4.0.0/.


If you still can't figure it out, show us the contents of your prefix header.

/Developer/SDKs/MacOSX10.4u.sdk/usr/include/c++/4.0.0/cstring: At global scope:
/Developer/SDKs/MacOSX10.4u.sdk/usr/include/c++/4.0.0/cstring:79: error: '::memcpy' has not been declared

Hmmm. Is one of your program's headers doing something stupid like #defining _STRING_H_, by any chance?


<cstring> explicitly includes <string.h>, so you should *never* be seeing messages about e.g. memcpy() not being declared. The only way that could happen, I think, is if _STRING_H_ was already defined when <cstring> was included, and if the define had come from some other place besides the system <string.h> header.

It's worth checking that your code doesn't define anything beginning with an "_". *All* of those symbols are reserved for use by "the implementation" (i.e. the system, the C compiler, and its runtime). If you want to use header guards, I suggest using just a trailing underscore, e.g.

  #ifndef MYHEADER_H_
  #define MYHEADER_H_

  #endif /* MYHEADER_H_ */

because that will never conflict with the system, even if you make a "String.h" header.

Kind regards,

Alastair.

--
http://alastairs-place.net


_______________________________________________ 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: 
 >Build failure (From: Apparao <email@hidden>)
 >Re: Build failure (From: Thomas Engelmeier <email@hidden>)
 >Re: Build failure (From: Apparao <email@hidden>)
 >Re: Build failure (From: Alastair Houghton <email@hidden>)
 >Re: Build failure (From: Apparao <email@hidden>)
 >Re: Build failure (From: Alastair Houghton <email@hidden>)
 >Re: Build failure (From: Apparao <email@hidden>)

  • Prev by Date: Re: Build failure
  • Next by Date: Re: Xcode uses 100% of cpu while debugging
  • Previous by thread: Re: Build failure
  • Next by thread: Increasing your app's stack size
  • Index(es):
    • Date
    • Thread