dumbsnake
January 19th, 2007, 11:32 PM
I am sorry to be posting for help, but I have spent 2-3 hours trying to figure this out so I think it is worth it. I tried to find the answer online, but couldn't. And I didn't know what to search for here on the forums so that failed too.
My problem is that when I try to compile programs (using g++ under KDevelop) they don't work if I include <algorithm> or <vector> or presumably any other header like that. They work otherwise. I get the following output:
cd '/home/nick/Projects/taogo/debug/src' && WANT_AUTOCONF_2_5="1" make taogo.lo
compiling taogo.cpp (g++)
mkdir .libs
compiling taogo.o (g++)
/usr/lib/gcc/i486-linux-gnu/4.0.3/../../../../include/c++/4.0.3/ctime:66: error: '::clock_t' has not been declared
/usr/lib/gcc/i486-linux-gnu/4.0.3/../../../../include/c++/4.0.3/ctime:67: error: '::time_t' has not been declared
/usr/lib/gcc/i486-linux-gnu/4.0.3/../../../../include/c++/4.0.3/ctime:68: error: '::tm' has not been declared
/usr/lib/gcc/i486-linux-gnu/4.0.3/../../../../include/c++/4.0.3/ctime:70: error: '::clock' has not been declared
/usr/lib/gcc/i486-linux-gnu/4.0.3/../../../../include/c++/4.0.3/ctime:71: error: '::difftime' has not been declared
/usr/lib/gcc/i486-linux-gnu/4.0.3/../../../../include/c++/4.0.3/ctime:72: error: '::mktime' has not been declared
/usr/lib/gcc/i486-linux-gnu/4.0.3/../../../../include/c++/4.0.3/ctime:73: error: '::time' has not been declared
/usr/lib/gcc/i486-linux-gnu/4.0.3/../../../../include/c++/4.0.3/ctime:74: error: '::asctime' has not been declared
/usr/lib/gcc/i486-linux-gnu/4.0.3/../../../../include/c++/4.0.3/ctime:75: error: '::ctime' has not been declared
/usr/lib/gcc/i486-linux-gnu/4.0.3/../../../../include/c++/4.0.3/ctime:76: error: '::gmtime' has not been declared
/usr/lib/gcc/i486-linux-gnu/4.0.3/../../../../include/c++/4.0.3/ctime:77: error: '::localtime' has not been declared
/usr/lib/gcc/i486-linux-gnu/4.0.3/../../../../include/c++/4.0.3/ctime:78: error: '::strftime' has not been declared
make: *** [taogo.lo] Error 1
*** Exited with status: 2 ***
My sourcecode is simply:
#include <vector>
I stripped down the sourcecode to find the problem. I think there is something wrong with my include paths, but I am helpless (too many years of visual studio). Thanks in advance. If there is something I could read that explains how all this stuff works, I would love to read it because I think it would be worth learning.
My problem is that when I try to compile programs (using g++ under KDevelop) they don't work if I include <algorithm> or <vector> or presumably any other header like that. They work otherwise. I get the following output:
cd '/home/nick/Projects/taogo/debug/src' && WANT_AUTOCONF_2_5="1" make taogo.lo
compiling taogo.cpp (g++)
mkdir .libs
compiling taogo.o (g++)
/usr/lib/gcc/i486-linux-gnu/4.0.3/../../../../include/c++/4.0.3/ctime:66: error: '::clock_t' has not been declared
/usr/lib/gcc/i486-linux-gnu/4.0.3/../../../../include/c++/4.0.3/ctime:67: error: '::time_t' has not been declared
/usr/lib/gcc/i486-linux-gnu/4.0.3/../../../../include/c++/4.0.3/ctime:68: error: '::tm' has not been declared
/usr/lib/gcc/i486-linux-gnu/4.0.3/../../../../include/c++/4.0.3/ctime:70: error: '::clock' has not been declared
/usr/lib/gcc/i486-linux-gnu/4.0.3/../../../../include/c++/4.0.3/ctime:71: error: '::difftime' has not been declared
/usr/lib/gcc/i486-linux-gnu/4.0.3/../../../../include/c++/4.0.3/ctime:72: error: '::mktime' has not been declared
/usr/lib/gcc/i486-linux-gnu/4.0.3/../../../../include/c++/4.0.3/ctime:73: error: '::time' has not been declared
/usr/lib/gcc/i486-linux-gnu/4.0.3/../../../../include/c++/4.0.3/ctime:74: error: '::asctime' has not been declared
/usr/lib/gcc/i486-linux-gnu/4.0.3/../../../../include/c++/4.0.3/ctime:75: error: '::ctime' has not been declared
/usr/lib/gcc/i486-linux-gnu/4.0.3/../../../../include/c++/4.0.3/ctime:76: error: '::gmtime' has not been declared
/usr/lib/gcc/i486-linux-gnu/4.0.3/../../../../include/c++/4.0.3/ctime:77: error: '::localtime' has not been declared
/usr/lib/gcc/i486-linux-gnu/4.0.3/../../../../include/c++/4.0.3/ctime:78: error: '::strftime' has not been declared
make: *** [taogo.lo] Error 1
*** Exited with status: 2 ***
My sourcecode is simply:
#include <vector>
I stripped down the sourcecode to find the problem. I think there is something wrong with my include paths, but I am helpless (too many years of visual studio). Thanks in advance. If there is something I could read that explains how all this stuff works, I would love to read it because I think it would be worth learning.