I am a bit confused about the use of _v2 standard libraries on HP. I am working on HP11.11 risk machine and HP 11.23 Itanium machine.
I am building a C++ shared library which is linked by a JNI shared library and other non-java related libraries. Eveything is compiled with -AA flag. When I use -lstd, -lstream -lCsup, it seems to work for non-java related application. But the java application works only when I use -lstd_v2 -lCsup_v2 on HP11.11. I got some information from this page:
HP aC++ Online Programmer's Guide
For Itanium, the JNI example shows the mix of _v2 and non-_v2 libraries. (below) Can those libraries be mixed? Should they be -lstd_v2 -lCsup_v2 for -AA?
"On Itanium, create the shared library using:
$ aCC -b -o libaCCImpl.so aCCImpl.o \
-lstd_v2 -lCsup -lunwind -lm
On Itanium, -lstd_v2 is necessary, otherwise, running the program will result in UnsatisfiedLinkErrors."
HP Unix - Java - Using Java 2 JNI on HP-UX
Generally, are those _v2 and non_v2 libraries compatible? Can those non-_v2 libraries be used with -AA if they are used for C++ only applications? Or should we always use _v2 libraries when we compile with -AA?
I found this site saying we need to use _v2 libraries on Itanium.
Mainsoft, Porting enterprise applications from Windows to HP-UX11i for Intel Itanium 2
Can someone shed some light on this issue please?
Thank you.