Hello Everyone,
I compile the following file, mydate.cpp, and get these errors:
idun:/h/odin/IOCDir/IDate >make
/usr/vacpp/bin/xlC_r -c -qsource -qlistopt -qxref -qattr -I/usr/vacpp/include -I/h/odin/IOCDir/IDate -o mydate.o /h/odin/IOCDir/IDate/mydate.cpp
"/usr/vacpp/include/string.h", line 37.30: 1540-0400 (S) "memset(void *, int, size_t)" has a conflicting declaration.
"/usr/include/sys/time.h", line 171.18: 1540-0424 (I) "memset" is declared on line 171 of "/usr/include/sys/time.h".
"/usr/vacpp/include/string.h", line 119.30: 1540-0400 (S) "memset(void *, int, size_t)" has a conflicting declaration.
"/usr/include/sys/time.h", line 171.18: 1540-0424 (I) "memset" is declared on line 171 of "/usr/include/sys/time.h".
"/usr/include/string.h", line 79.26: 1540-0424 (I) "memset" is declared on line 79 of "/usr/include/string.h".
make: 1254-004 The error code from the last command is 1.
mydate.cpp
----------------------------------------------------------------------------
----------------------------------------------------------------------------
Now the other two files, idate.cpp and idate.hpp don't contain anything fancy except that idate.cpp has the following extern declarations:Code:#include <iostream> #include <idate.hpp> using namespace std; int main() { IDate date; cout<< "Days in the year are: " << date.daysInYear(2002) << endl; cout<< "Days in the year are: " << date.daysInYear(2004) << endl; return(0); }
Any hints or help would be greatly appreciated. Oh, and I am using the IBM vacpp 6.0 compiler on AIX 5.1.Code:extern "C" { #include <stddef.h> #include <time.h> #include <string.h> }
Thanks!