Re: Compiler error when handling C++ std::string class variable
Re: Compiler error when handling C++ std::string class variable
- Subject: Re: Compiler error when handling C++ std::string class variable
- From: Dave Carrigan <email@hidden>
- Date: Wed, 11 Jun 2008 13:14:19 -0700
On Jun 11, 2008, at 12:55 PM, David Lobron wrote:
Time.h:47: error: 'string' in namespace 'std' does not name a type
The code in question looks like this:
static std::string local( const time_t& iTime );
This compiles without a problem on Linux - only XCode throws the
error. I suspect it might be happening because I'm not supplying a
link command, e.g., to a libstdc++ dynamic library.
It's a compiler error, which means you haven't gotten to the link
phase, so it has nothing to do with your libraries. Most likely you
don't have a "#include <string>" in your file. If it compiles on
Linux, that just means that something in the Linux headers is
including <string> for you.
--
Dave Carrigan
email@hidden
Seattle, WA, USA
Attachment:
PGP.sig
Description: This is a digitally signed message part
_______________________________________________
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