When trying to compile the attached source file with $ ~/gcc/bin/g++ --version g++ (GCC) 4.2.0 20051121 (experimental) with the options /Users/eschnett/gcc/bin/g++ -DCARPET_INT -DCARPET_REAL -DCARPET_COMPLEX -mlongcall -ftrapv -fwrapv -fbounds-check -g3 -Wall -Wshadow -Wpointer-arith -Wcast-qual -Wcast-align -Woverloaded-virtual -c -o $current_wd/patch_system.cc.o $current_wd/patch_system.cc -I"/sw/include" -I"/sw/include" -I"/Users/eschnett/petsc-2.1.6/include" -I"/Users/eschnett/petsc-2.1.6/bmake/macx" -I"/Users/eschnett/Cvanilla/arrangements/AEIThorns/AHFinderDirect/src" -I"/Users/eschnett/Cvanilla/arrangements/AEIThorns/AHFinderDirect/src/include" -I"/Users/eschnett/Cvanilla/configs/einstein-orange-gcc-debug/config-data" -I"/Users/eschnett/Cvanilla/configs/einstein-orange-gcc-debug/bindings/include" -I"/Users/eschnett/Cvanilla/src/include" -I"/Users/eschnett/Cvanilla/arrangements" -I"/Users/eschnett/Cvanilla/configs/einstein-orange-gcc-debug/bindings/Configuration/Thorns" -I"/Users/eschnett/Cvanilla/arrangements/AEIThorns/AHFinderDirect/src/patch" -I"/Users/eschnett/Cvanilla/arrangements/AEIThorns/AHFinderDirect/src/patch/include" -DTHORN_IS_AHFinderDirect -DCCODE then I receive errors beginning with /Users/eschnett/gcc/lib/gcc/powerpc-apple-darwin8.3.0/4.2.0/../../../../include/c++/4.2.0/ctime:69: error: ‘::tm’ has not been declared /Users/eschnett/gcc/lib/gcc/powerpc-apple-darwin8.3.0/4.2.0/../../../../include/c++/4.2.0/ctime:71: error: ‘::clock’ has not been declared /Users/eschnett/gcc/lib/gcc/powerpc-apple-darwin8.3.0/4.2.0/../../../../include/c++/4.2.0/ctime:72: error: ‘::difftime’ has not been declared
Created attachment 10309 [details] Failing source code
Created attachment 10310 [details] Failing preprocessed sourc code (gzipped)
# 1 "/Users/eschnett/Cvanilla/configs/einstein-orange-gcc-debug/bindings/Configuration/Thorns/time.h" 1 3 4 Hmm, it is including the wrong time.h for some reason. Could you add -v and provide the output, I am mainly looking for the include patch order.
We have in libstdc++: #include <time.h> So this is invalid. -I does: -I dir Add the directory dir to the list of directories to be searched for header files. Directories named by -I are searched before the standard system include directories. If the directory dir is a standard system include directory, the option is ignored to ensure that the default search order for system directories and the spe- cial treatment of system headers are not defeated . either use -iquote which is new for 4.0.0 or use -idirafter
As I said this is invalid.
Thanks for finding the reason. The include file was actually called "Time.h", but my file system is case insensitive.