views:

18

answers:

1

I'm trying to use in an Xcode (iphone) static library, and can't figure out this error. Anyone else had this before?

It borks in the file stl_algobase.h at these places:

__glibcxx_requires_valid_range(__first, __last);

I've tried using GCC 4.0, but it always includes from here:

/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.1.3.sdk/usr/include/c++/4.2.1/bits/stl_algobase.h:606:0 '__glibcxx_requires_valid_range' was not declared in this scope in /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.1.3.sdk/usr/include/c++/4.2.1/bits/stl_algobase.h

Andrew

+1  A: 

It's likely that your project contains a header file that shadows a system header file.

If you have a header called "debug.h", try renaming it to something else and recompile your project.

diciu
I figured this out last night, and you are spot on! <string> was including <debug/debug.h> but for some reason Xcode can't tell the difference between <debug/debug.h> and "debug/debug.h"? Come on Xcode, get with the program!
Andrew