When I compile my program, I get this error:
psp-g++ -I. -I/usr/local/pspdev/psp/sdk/include -O2 -G0 -Wall -DPSP -I. -I/usr/local/pspdev/psp/sdk/include -O2 -G0 -Wall -DPSP -c -o Viewer.o Viewer.cpp
/usr/local/pspdev/lib/gcc/psp/4.0.2/../../../../include/c++/4.0.2/ctime:70: error: '::tm' has not been declared
/usr/local/pspdev/lib/gcc/psp/4.0.2/../../../../include/c++/4.0.2/ctime:72: error: '::clock' has not been declared
/usr/local/pspdev/lib/gcc/psp/4.0.2/../../../../include/c++/4.0.2/ctime:73: error: '::difftime' has not been declared
/usr/local/pspdev/lib/gcc/psp/4.0.2/../../../../include/c++/4.0.2/ctime:74: error: '::mktime' has not been declared
/usr/local/pspdev/lib/gcc/psp/4.0.2/../../../../include/c++/4.0.2/ctime:75: error: '::time' has not been declared
/usr/local/pspdev/lib/gcc/psp/4.0.2/../../../../include/c++/4.0.2/ctime:76: error: '::asctime' has not been declared
/usr/local/pspdev/lib/gcc/psp/4.0.2/../../../../include/c++/4.0.2/ctime:77: error: '::ctime' has not been declared
/usr/local/pspdev/lib/gcc/psp/4.0.2/../../../../include/c++/4.0.2/ctime:78: error: '::gmtime' has not been declared
/usr/local/pspdev/lib/gcc/psp/4.0.2/../../../../include/c++/4.0.2/ctime:79: error: '::localtime' has not been declared
/usr/local/pspdev/lib/gcc/psp/4.0.2/../../../../include/c++/4.0.2/ctime:80: error: '::strftime' has not been declared
make: *** [Viewer.o] Error 1
I've searched around a bit, and it seems as it is quite a rare problem, which I find rather funny; surely somebody else must have got this problem sometime, if they use the same compiler? I have the latest PSPSDK installed.
I don't really understand it, but is has something to do with in what way header files are included; in the "ctime" header file, there's an include that includes the file "time.h", and it has something to do with the compiler and the way (or order) it includes system header files (or something like that). However, even though I've found similar problems when I googled, I haven't found a concrete way of solving this.
Any ideas?