   Help! gcc 4.0.0 and Eclipse
  I'm trying Eclipse with C++ for the first time, and I just can't seem to get this seemingly simple program to compile:#include <iostream>using namespace std;int main(int argc, char **argv){cout << "Hello, world!" << endl;return 0;}Here's the errors I receive (I know, it's not easy to look at...):SeverityDescriptionResourceIn FolderLocationCreation Time2*** [main.o] Error 1TodeDecember 12, 2005 10:44:57 PM2error: ‘::clock_t’ has not been declared[/usr/lib/gcc/i386-redhat-linux/4.0.0/../../../../include/c++/4.0.0/ctime]Todeline 66December 12, 2005 10:44:57 PM2error: ‘::time_t’ has not been declared[/usr/lib/gcc/i386-redhat-linux/4.0.0/../../../../include/c++/4.0.0/ctime]Todeline 67December 12, 2005 10:44:57 PM2error: ‘::tm’ has not been declared[/usr/lib/gcc/i386-redhat-linux/4.0.0/../../../../include/c++/4.0.0/ctime]Todeline 68December 12, 2005 10:44:57 PM2error: ‘::clock’ has not been declared[/usr/lib/gcc/i386-redhat-linux/4.0.0/../../../../include/c++/4.0.0/ctime]Todeline 70December 12, 2005 10:44:57 PM2error: ‘::difftime’ has not been declared[/usr/lib/gcc/i386-redhat-linux/4.0.0/../../../../include/c++/4.0.0/ctime]Todeline 71December 12, 2005 10:44:57 PM2error: ‘::mktime’ has not been declared[/usr/lib/gcc/i386-redhat-linux/4.0.0/../../../../include/c++/4.0.0/ctime]Todeline 72December 12, 2005 10:44:57 PM2error: ‘::time’ has not been declared[/usr/lib/gcc/i386-redhat-linux/4.0.0/../../../../include/c++/4.0.0/ctime]Todeline 73December 12, 2005 10:44:57 PM2error: ‘::asctime’ has not been declared[/usr/lib/gcc/i386-redhat-linux/4.0.0/../../../../include/c++/4.0.0/ctime]Todeline 74December 12, 2005 10:44:57 PM2error: ‘::ctime’ has not been declared[/usr/lib/gcc/i386-redhat-linux/4.0.0/../../../../include/c++/4.0.0/ctime]Todeline 75December 12, 2005 10:44:57 PM2error: ‘::gmtime’ has not been declared[/usr/lib/gcc/i386-redhat-linux/4.0.0/../../../../include/c++/4.0.0/ctime]Todeline 76December 12, 2005 10:44:57 PM2error: ‘::localtime’ has not been declared[/usr/lib/gcc/i386-redhat-linux/4.0.0/../../../../include/c++/4.0.0/ctime]Todeline 77December 12, 2005 10:44:57 PM2error: ‘::strftime’ has not been declared[/usr/lib/gcc/i386-redhat-linux/4.0.0/../../../../include/c++/4.0.0/ctime]Todeline 78December 12, 2005 10:44:57 PM2error: forward declaration of ‘struct tm’[/usr/include/wchar.h]Todeline 123December 12, 2005 10:44:57 PM2error: invalid use of undefined type ‘struct tm’[/usr/lib/gcc/i386-redhat-linux/4.0.0/../../../../include/c++/4.0.0/bits/locale_facets.tcc]Todeline 1760December 12, 2005 10:44:57 PM2error: invalid use of undefined type ‘struct tm’[/usr/lib/gcc/i386-redhat-linux/4.0.0/../../../../include/c++/4.0.0/bits/locale_facets.tcc]Todeline 1767December 12, 2005 10:44:57 PM2error: invalid use of undefined type ‘struct tm’[/usr/lib/gcc/i386-redhat-linux/4.0.0/../../../../include/c++/4.0.0/bits/locale_facets.tcc]Todeline 1775December 12, 2005 10:44:57 PM2error: invalid use of undefined type ‘struct tm’[/usr/lib/gcc/i386-redhat-linux/4.0.0/../../../../include/c++/4.0.0/bits/locale_facets.tcc]Todeline 1782December 12, 2005 10:44:57 PM2error: invalid use of undefined type ‘struct tm’[/usr/lib/gcc/i386-redhat-linux/4.0.0/../../../../include/c++/4.0.0/bits/locale_facets.tcc]Todeline 1794December 12, 2005 10:44:57 PM2error: invalid use of undefined type ‘struct tm’[/usr/lib/gcc/i386-redhat-linux/4.0.0/../../../../include/c++/4.0.0/bits/locale_facets.tcc]Todeline 1801December 12, 2005 10:44:57 PM2error: invalid use of undefined type ‘struct tm’[/usr/lib/gcc/i386-redhat-linux/4.0.0/../../../../include/c++/4.0.0/bits/locale_facets.tcc]Todeline 1804December 12, 2005 10:44:57 PM2error: invalid use of undefined type ‘struct tm’[/usr/lib/gcc/i386-redhat-linux/4.0.0/../../../../include/c++/4.0.0/bits/locale_facets.tcc]Todeline 1816December 12, 2005 10:44:57 PM2error: invalid use of undefined type ‘struct tm’[/usr/lib/gcc/i386-redhat-linux/4.0.0/../../../../include/c++/4.0.0/bits/locale_facets.tcc]Todeline 1821December 12, 2005 10:44:57 PM2error: invalid use of undefined type ‘struct tm’[/usr/lib/gcc/i386-redhat-linux/4.0.0/../../../../include/c++/4.0.0/bits/locale_facets.tcc]Todeline 1829December 12, 2005 10:44:57 PM2error: invalid use of undefined type ‘struct tm’[/usr/lib/gcc/i386-redhat-linux/4.0.0/../../../../include/c++/4.0.0/bits/locale_facets.tcc]Todeline 1833December 12, 2005 10:44:57 PM2error: invalid use of undefined type ‘struct tm’[/usr/lib/gcc/i386-redhat-linux/4.0.0/../../../../include/c++/4.0.0/bits/locale_facets.tcc]Todeline 1853December 12, 2005 10:44:57 PM2error: invalid use of undefined type ‘struct tm’[/usr/lib/gcc/i386-redhat-linux/4.0.0/../../../../include/c++/4.0.0/bits/locale_facets.tcc]Todeline 1889December 12, 2005 10:44:57 PM2error: invalid use of undefined type ‘struct tm’[/usr/lib/gcc/i386-redhat-linux/4.0.0/../../../../include/c++/4.0.0/bits/locale_facets.tcc]Todeline 1897December 12, 2005 10:44:57 PM2error: invalid use of undefined type ‘struct tm’[/usr/lib/gcc/i386-redhat-linux/4.0.0/../../../../include/c++/4.0.0/bits/locale_facets.tcc]Todeline 2123December 12, 2005 10:44:57 PM2error: invalid use of undefined type ‘struct tm’[/usr/lib/gcc/i386-redhat-linux/4.0.0/../../../../include/c++/4.0.0/bits/locale_facets.tcc]Todeline 2169December 12, 2005 10:44:57 PM2error: invalid use of undefined type ‘struct tm’[/usr/lib/gcc/i386-redhat-linux/4.0.0/../../../../include/c++/4.0.0/bits/locale_facets.tcc]Todeline 2196December 12, 2005 10:44:57 PMI installed Eclipse from the RPMs, so I'm pretty sure I didn't do anything to botch my installation. I've also done no modifications to my gcc toolchain. I'm completely at a loss to this.   
  That's a bit odd.  Try including using the type std::clock_t in your app and see if it spits out an error for that, if not it looks like the GCC 4.0.0 headers are trying to use the global namespace when they should be using the std namespace.Also, are you using gcc or g++ to compile?  There are subtle differences between the two, although I *think* the only difference is in the libraries they automatically include.  There might be some #defines that are different as well that are causing this.   ;  Adding:::clock_t t;caused (in addition the the errors I've already received):g++ -I/usr/local/include/enet -O0 -g3 -Wall -c -fmessage-length=0 -omain.o ../main.cpp(...)../main.cpp: In function ‘int main(int, char**)’:../main.cpp:7: error: ‘::clock_t’ has not been declared../main.cpp:7: error: expected `;' before ‘t’Invoking with gcc instead of g++ produces the same errors.In an act of desperation, I performed a yum update on this fresh install from the fedora CDs. There were about 550MB of updates to download. I hoped that maybe there was a fix already implemented for whatever is wrong with my installation of gcc. Apparently there isn't. And now I have the pleasure of trying to get my ATI drivers to work again, after I just spent the better portion of two days getting them to work. I'm beginning to remember why I stopped using linux the last time... ugh!But thanks for your help.   ;  UPDATEThe strangest thing is now happening. I've removed the additional include path and now it compiles fine. Evidently theres a file in the include path that I had added which is in name conflict with a standard header. I wasn't actually including a file from the path that I had added, so that's the only conclusion I can come up with.Problem solved.   