OCCI and aCC
I'm having problems getting a sample OCCI app to compile with HP's aCC compiler that uses both Oracle OCCI and Iona ORBIX E2A V5. OCCI requires -AA and Orbix does not like -AA. The problem is that I get errors like this:
Error 19: "/ora1/oracle/OraHome1/rdbms/demo/occiCommon.h", line 575 # Unexpected
'std'.
void getVector( const AnyData &any, OCCI_STD_NAMESPACE::vector<OCCI_STD_NA
MESPACE::string> &vect) ;
^^^^^^^^^^^^^^^^^^
BTW, I get this error even when I explicitly do "#include <vector>" before "#include "occi.h" . When I compile/link with options:
/opt/aCC/bin/aCC -Wl,+s -Wl,+n +DAportable -mt -I../include_patches -I. -I/ora
1/oracle/OraHome1/rdbms/public -L. -L/ora1/oracle/OraHome1/lib32/ -o occidml occ
idml.cpp -locci -lclntsh -ln9 -lncrypt9 -lnbeq9 -lntcp9 -lntcps9 -lnsslb9 -lnus9
-lnldap9 -lldapclnt9 -lnsslb9 -lnhost9 -lntns9 -lnoname9 -lnbeq9 -lnhost9 -lnus
9 -lnldap9 -lldapclnt9 -lnsslb9 -lnoname9 -lntcp9 -lntcps9 -lnsslb9 -lntcp9 -lnt
ns9
But I compile/link successfully with -AA using this command:
/opt/aCC/bin/aCC -AA -Wl,+s -Wl,+n +DAportable -mt -I../include_patches -I. -I
/ora1/oracle/OraHome1/rdbms/public -L. -L/ora1/oracle/OraHome1/lib32/ -o occidml
occidml.cpp -locci -lclntsh -ln9 -lncrypt9 -lnbeq9 -lntcp9 -lntcps9 -lnsslb9 -l
nus9 -lnldap9 -lldapclnt9 -lnsslb9 -lnhost9 -lntns9 -lnoname9 -lnbeq9 -lnhost9 -
lnus9 -lnldap9 -lldapclnt9 -lnsslb9 -lnoname9 -lntcp9 -lntcps9 -lnsslb9 -lntcp9
-lntns9
Warning 890: "/opt/aCC/include_std/iostream_compat/iostream.h", line 4 # #warnin
g <iostream.h> is being replaced by <iostream> followed by "using namespace std;
"
#warning <iostream.h> is being replaced by <iostream> followed by "using nam
espace std;"
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
^^^^^^^^^^^^
Is this a bug in aCC? Isn't the syntax std::vector always valid as long as #include <vector> was done previously, regardless of whether or not this was done:
using namespace std
BTW, if I patch occi*.h to remove OCCI_STD_NAMESPACE::, then it compiles, links and runs.
??