compiling issue with sun studio 11
I am am trying to compile an application on Solaris 11 x86 using sun studio 11 compiler suite. I get the following errors when I compile a file called Terminal.cpp.
<snip>
"../libs/libFreeMat/Types.hpp", line 56: Warning: Identifier expected instead of "}".
"/usr/include/curses.h", line 141: Warning (Anachronism): Attempt to redefine TRUE without using #undef.
"Terminal.cpp", line 238: Warning (Anachronism): Formal argument 3 of type extern "C" int(*)(char) in call to tputs(char*, int, extern "C" int(*)(char)) is being passed int(*)(char).
"Terminal.cpp", line 246: Warning (Anachronism): Formal argument 3 of type extern "C" int(*)(char) in call to tputs(char*, int, extern "C" int(*)(char)) is being passed int(*)(char).
"Terminal.cpp", line 254: Warning (Anachronism): Formal argument 3 of type extern "C" int(*)(char) in call to tputs(char*, int, extern "C" int(*)(char)) is being passed int(*)(char).
"Terminal.cpp", line 262: Warning (Anachronism): Formal argument 3 of type extern "C" int(*)(char) in call to tputs(char*, int, extern "C" int(*)(char)) is being passed int(*)(char).
"Terminal.cpp", line 270: Warning (Anachronism): Formal argument 3 of type extern "C" int(*)(char) in call to tputs(char*, int, extern "C" int(*)(char)) is being passed int(*)(char).
"Terminal.cpp", line 278: Warning (Anachronism): Formal argument 3 of type extern "C" int(*)(char) in call to tputs(char*, int, extern "C" int(*)(char)) is being passed int(*)(char).
"/opt/SUNWspro/prod/include/CC/Cstd/./list.cc", line 84: Warning: Too many arguments in macro erase.
"/opt/SUNWspro/prod/include/CC/Cstd/./list.cc", line 97: Warning: Too many arguments in macro erase.
"/opt/SUNWspro/prod/include/CC/Cstd/./list.cc", line 136: Warning: Too many arguments in macro erase.
"/opt/SUNWspro/prod/include/CC/Cstd/./list.cc", line 136: Error: werase is not a member of std::list<std::T, std::Allocator>.
"/opt/SUNWspro/prod/include/CC/Cstd/./list.cc", line 139: Error: A declaration was expected instead of "while".
"/opt/SUNWspro/prod/include/CC/Cstd/./list.cc", line 139: Error: No direct declarator preceding "(".
"/opt/SUNWspro/prod/include/CC/Cstd/./list.cc", line 141: Warning: Too many arguments in macro erase.
"/opt/SUNWspro/prod/include/CC/Cstd/./list.cc", line 144: Error: A declaration was expected instead of "}".
"/opt/SUNWspro/prod/include/CC/Cstd/./list.cc", line 147: Error: Templates can only declare classes or functions.
"/opt/SUNWspro/prod/include/CC/Cstd/./list.cc", line 152: Error: iterator is not defined.
"/opt/SUNWspro/prod/include/CC/Cstd/./list.cc", line 152: Error: The function "end" must have a prototype.
"/opt/SUNWspro/prod/include/CC/Cstd/./list.cc", line 153: Error: const_iterator is not defined.
"/opt/SUNWspro/prod/include/CC/Cstd/./list.cc", line 153: Error: x is not defined.
"/opt/SUNWspro/prod/include/CC/Cstd/./list.cc", line 153: Error: Badly formed expression.
"/opt/SUNWspro/prod/include/CC/Cstd/./list.cc", line 154: Error: const_iterator is not defined.
"/opt/SUNWspro/prod/include/CC/Cstd/./list.cc", line 154: Error: x is not defined.
"/opt/SUNWspro/prod/include/CC/Cstd/./list.cc", line 154: Error: Badly formed expression.
"/opt/SUNWspro/prod/include/CC/Cstd/./list.cc", line 155: Error: A declaration was expected instead of "while".
"/opt/SUNWspro/prod/include/CC/Cstd/./list.cc", line 155: Error: No direct declarator preceding "(".
"/opt/SUNWspro/prod/include/CC/Cstd/./list.cc", line 156: Error: No direct declarator preceding "(".
"/opt/SUNWspro/prod/include/CC/Cstd/./list.cc", line 157: Warning: Too many arguments in macro erase.
"/opt/SUNWspro/prod/include/CC/Cstd/./list.cc", line 160: Error: A declaration was expected instead of "}".
"/opt/SUNWspro/prod/include/CC/Cstd/./list.cc", line 161: Error: A declaration was expected instead of "return".
"/opt/SUNWspro/prod/include/CC/Cstd/./list.cc", line 161: Error: There must be an identifier to declare.
"/opt/SUNWspro/prod/include/CC/Cstd/./list.cc", line 165: Error: Templates can only declare classes or functions.
"/opt/SUNWspro/prod/include/CC/Cstd/./list.cc", line 168: Error: iterator is not defined.
"/opt/SUNWspro/prod/include/CC/Cstd/./list.cc", line 168: Error: The function "end" must have a prototype.
"/opt/SUNWspro/prod/include/CC/Cstd/./list.cc", line 169: Error: A declaration was expected instead of "while".
"/opt/SUNWspro/prod/include/CC/Cstd/./list.cc", line 169: Error: No direct declarator preceding "(".
"/opt/SUNWspro/prod/include/CC/Cstd/./list.cc", line 173: Error: A declaration was expected instead of "if".
Compilation aborted, too many Error messages.
*** Error code 1
make: Fatal error: Command failed for target `Terminal.o'
</snip>
These are the includes for that file.
<snip>
#include <qapplication.h>
#include "Serialize.hpp"
#include "Terminal.hpp"
#include <errno.h>
#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#ifdef Q_WS_X11
#include <curses.h>
#include <term.h>
#include <curses.h>
#include <string>
#include <sys/ioctl.h>
#include "Exception.hpp"
#include <sys/types.h>
#include <sys/stat.h>
#include <dirent.h>
#include <glob.h>
</snip>
Have I missed out and file to include. Apparently it compiles in Linux.

