compat=4 and #include<string>

I am trying to build a project that uses string and wstring out of #include <string>, but because I am using Orbix 3 corba middleware I am having uses compatibility mode compat=4. This gives me the following error:

"/opt/SUNWspro/SC5.0/include/CC/./new", line 32: Error: The prior declaration for operator new(unsigned) has no exception specification.

"/opt/SUNWspro/SC5.0/include/CC/./new", line 34: Error: The prior declaration for operator delete(void *) has no exception specification.

"/opt/SUNWspro/SC5.0/include/CC/./new", line 36: Error: The prior declaration for operator new[](unsigned) has no exception specification.

"/opt/SUNWspro/SC5.0/include/CC/./new", line 32: Error: The prior declaration for operator delete[](unsigned) has no exception specification.

I was expecting to have to use new.h for compat=4, but <string> includes <rw/string_ref> which includes <memory> which includes <new>. Does this mean that I cannot use <string>?

My compile options are:

-compat=4 -library=rwtools7 -features=%none,bool,namespace,except,mutable

Thanks in advance,

Damian

[1176 byte] By [minihand] at [2007-11-25 23:41:40]
# 1

I have had the same error message when trying to use compat 4 with version 6. I have found a way of getting rid of the error and allowing the compile/link to finish. However I was unable to test if the program actually ran.

If you are not using exceptions then you should (in theory) be able to use -no%except. The errors are then relpaced with 1 warning, but at least it compiles. I would be very interested in any solution you find to this problem.

Sorry I was unable to help more,

Martin Lester ( martin.lester@teleca.com )

mlester1 at 2007-7-5 18:49:14 > top of Java-index,Development Tools,Solaris and Linux Development Tools...
# 2
Not use new style of include in compat=4 modeUse #include <string.h>
IvanVaganov at 2007-7-5 18:49:14 > top of Java-index,Development Tools,Solaris and Linux Development Tools...
# 3
Have U found a soln to U'r problem. I am stuck on this. Nitya
NityanandK at 2007-7-5 18:49:14 > top of Java-index,Development Tools,Solaris and Linux Development Tools...
# 4
My solution was to not even try to get the bundled STL to work with compat=4. I downloaded STLport ( http://www.stlport.org) and used it instead.
dzwick at 2007-7-5 18:49:14 > top of Java-index,Development Tools,Solaris and Linux Development Tools...