> > Try adding > #include <algorithm> > where sort resides. > Daniel > - Show quoted text - On Apr 3, 2009, at 8:57 AM, RCY wrote: I am getting the following error when I try to compile Overture v2.2. I would appreciate any help in resolving this problem Recif g++ -fPIC -fpermissive -I/home/recif/Overture.v22/include -I. - DUSE_MESA -I/home/recif/A++/install/include -I/usr/include -I/usr/ include -DBL_USE_DOUBLE -DBL_Solaris -Wno-deprecated -I/usr/lib/ perl/5.10/CORE /home/rchella/A++P++-0.7.9d/STL-link - DHAS_MODFL_PROTO -g -c LoadBalancer.C LoadBalancer.C: In member function 'int LoadBalancer ::determineLoadBalanceKernighanLin(GridDistributionList&, int) const': LoadBalancer.C:474: error: 'sort' was not declared in this scope make[1]: *** [LoadBalancer.o] Error 1 make[1]: Leaving directory `/home/recif/Overture.v22/GridFunction' make: *** [all] Error 2 Thanks, that helped, but I now get the following error (I had to replace several #include <iostream.> directives by # include <iostream> in the include and templates subdirectories) Recif g++ -I. -fPIC -fpermissive -I/home/recif/Overture.v22/include -I. -DUSE_MESA -I/home/recif/A++/install/include -I/usr/include -I/usr/include -DBL_USE_DOUBLE -DBL_Solaris -Wno-deprecated -I/usr/lib/perl/5.10/CORE -DHAS_MODFL_PROTO -g -DBL_SPACEDIM=3 -DBL_USE_FLOAT -DBL_ARCH_IEEE -DBL_FORT_USE_UNDERSCORE -DBL_BUG_DEFARG -DBL_LANG_CC -c Box.C In file included from /home/recif/Overture.v22/include/Box.H:41, from Box.C:36: /home/recif/Overture.v22/include/IntVect.H:280: error: ‘ostream’ has not been declared /home/recif/Overture.v22/include/IntVect.H:284: error: ‘ostream’ has not been declared /home/recif/Overture.v22/include/IntVect.H:367: warning: ISO C++ forbids declaration of ‘ostream’ with no type /home/recif/Overture.v22/include/IntVect.H:367: error: ‘ostream’ is neither function nor member function; cannot be declared friend /home/recif/Overture.v22/include/IntVect.H:367: error: expected ‘;’ before ‘&’ token /home/recif/Overture.v22/include/IntVect.H:372: warning: ISO C++ forbids declaration of ‘istream’ with no type /home/recif/Overture.v22/include/IntVect.H:372: error: ‘istream’ is neither function nor member function; cannot be declared friend /home/recif/Overture.v22/include/IntVect.H:372: error: expected ‘;’ before ‘&’ token /home/recif/Overture.v22/include/IntVect.H:280: error: ‘cout’ was not declared in this scope /home/recif/Overture.v22/include/IntVect.H:284: error: ‘cout’ was not declared in this scope In file included from /home/recif/Overture.v22/include/Box.H:43, from Box.C:36: /home/recif/Overture.v22/include/IndexType.H:163: warning: ISO C++ forbids declaration of ‘ostream’ with no type /home/recif/Overture.v22/include/IndexType.H:163: error: ‘ostream’ is neither function nor member function; cannot be declared friend /home/recif/Overture.v22/include/IndexType.H:163: error: expected ‘;’ before ‘&’ token /home/recif/Overture.v22/include/IndexType.H:168: warning: ISO C++ forbids declaration of ‘istream’ with no type /home/recif/Overture.v22/include/IndexType.H:168: error: ‘istream’ is neither function nor member function; cannot be declared friend /home/recif/Overture.v22/include/IndexType.H:168: error: expected ‘;’ before ‘&’ token In file included from /home/recif/Overture.v22/include/Box.H:44, from Box.C:36: /home/recif/Overture.v22/include/Orientation.H:132: warning: ISO C++ forbids declaration of ‘ostream’ with no type /home/recif/Overture.v22/include/Orientation.H:132: error: ‘ostream’ is neither function nor member function; cannot be declared friend /home/recif/Overture.v22/include/Orientation.H:132: error: expected ‘;’ before ‘&’ token /home/recif/Overture.v22/include/Orientation.H:137: warning: ISO C++ forbids declaration of ‘istream’ with no type /home/recif/Overture.v22/include/Orientation.H:137: error: ‘istream’ is neither function nor member function; cannot be declared friend /home/recif/Overture.v22/include/Orientation.H:137: error: expected ‘;’ before ‘&’ token In file included from Box.C:36: /home/recif/Overture.v22/include/Box.H:608: warning: ISO C++ forbids declaration of ‘ostream’ with no type /home/recif/Overture.v22/include/Box.H:608: error: ‘ostream’ is neither function nor member function; cannot be declared friend /home/recif/Overture.v22/include/Box.H:608: error: expected ‘;’ before ‘&’ token /home/recif/Overture.v22/include/Box.H:613: warning: ISO C++ forbids declaration of ‘istream’ with no type /home/recif/Overture.v22/include/Box.H:613: error: ‘istream’ is neither function nor member function; cannot be declared friend /home/recif/Overture.v22/include/Box.H:613: error: expected ‘;’ before ‘&’ token /home/recif/Overture.v22/include/Box.H:619: error: ‘ostream’ has not been declared /home/recif/Overture.v22/include/Box.H:619: error: ‘cerr’ was not declared in this scope Box.C:740: error: expected constructor, destructor, or type conversion before ‘&’ token Box.C:756: error: expected constructor, destructor, or type conversion before ‘&’ token make[1]: *** [Box.o] Error 1 make[1]: Leaving directory `/home/recif/Overture.v22/boxlib' make: *** [all] Error 2