getting an error from a library include

Hi -

I have a program with an include for the first line:

#include <iostream>

And it gives me a slew of errors:

make: Entering directory `/Volumes/1_TB_HD/Users/mzimmers/Desktop/QtTestbed'
g++ -c -pipe -g -gdwarf-2 -arch x86_64 -Xarch_x86_64 -mmacosx-version-min=10.5 -Wall -W -I/Developer/Applications/Qt/Desktop/Qt/4.8.0/gcc/mkspecs/macx-g++ -I. -I/usr/include/sys -o telnetserver.o telnetserver.cpp
In file included from /usr/include/c++/4.2.1/cwchar:52,
from /usr/include/c++/4.2.1/bits/postypes.h:46,
from /usr/include/c++/4.2.1/iosfwd:49,
from /usr/include/c++/4.2.1/ios:43,
from /usr/include/c++/4.2.1/ostream:45,
from /usr/include/c++/4.2.1/iostream:45,
from telnetserver.cpp:22:
/usr/include/c++/4.2.1/ctime:66: error: '::clock_t' has not been declared
/usr/include/c++/4.2.1/ctime:68: error: '::tm' has not been declared
/usr/include/c++/4.2.1/ctime:70: error: '::clock' has not been declared
/usr/include/c++/4.2.1/ctime:71: error: '::difftime' has not been declared
/usr/include/c++/4.2.1/ctime:72: error: '::mktime' has not been declared
/usr/include/c++/4.2.1/ctime:73: error: '::time' has not been declared
/usr/include/c++/4.2.1/ctime:74: error: '::asctime' has not been declared
/usr/include/c++/4.2.1/ctime:75: error: '::ctime' has not been declared
/usr/include/c++/4.2.1/ctime:76: error: '::gmtime' has not been declared
/usr/include/c++/4.2.1/ctime:77: error: '::localtime' has not been declared
/usr/include/c++/4.2.1/ctime:78: error: '::strftime' has not been declared


(telnetserver.cpp is my file, and line 22 is the first non-comment line.)
Any idea what could be causing this?
Last edited on
Seems like <ctime> header is not included.
Please post the code, so that we can see what is happening. Assuming the problem is not yet solved
Problem is resolved. Evidently I was using in include path that contained header files that are somehow incompatible. Thanks for looking.
Topic archived. No new replies allowed.