Neoview ODBC Drivers Manual (R2.3)
1. Rename connect_test.cpp to connect_test.c
2. cc connect_test.c +DD64 -I/usr/include/hpodbc -L/usr/lib/hpux64 \
-lhpodbc64 -lstd_v2 -lCsup -lunwind -lm -lhpodbc -o connect_test
NOTE: If you are compiling with a pthreads library, the pthreads library must
be the first library linked. For example:
cc connect_test.c +DD64 -I/usr/include/hpodbc -L/usr/lib/hpux64 \
-lpthread -lhpodbc64 -lstd_v2 -lCsup -lunwind -lm -lhpodbc -o connect_test
• For HP-UX(PA-RISC)
aCC -AA connect_test.cpp -L/usr/lib -I/usr/include/hpodbc \
-lhpodbc -lhppa -lstd_v2 -lCsup_v2 -lm
NOTE: If you are compiling with a pthreads library, the pthreads library must be the
first library linked. For example:
aCC -AA connect_test.cpp -L/usr/lib -I/usr/include/hpodbc \
-lpthread -lhpodbc -lhppa -lstd_v2 -lCsup_v2 -lm
To use cc for compiling and linking:
1. rename connect_test.cpp to connect_test.c
2. cc connect_test.c -L/usr/lib -I/usr/include/hpodbc -lhppa \
-lstd_v2 -lCsup -lunwind -lm -lhpodbc -o connect_test
NOTE: If you are compiling with a pthreads library, the pthreads library must
be the first library linked. For example:
cc connect_test.c -L/usr/lib -I/usr/include/hpodbc -lhppa \
-lstd_v2 -lCsup -lunwind -lm -lpthread -lhpodbc -o connect_test
• On IBM AIX®:
g++ -mxaix32 connect_test.cpp -L/usr/lib -I/usr/include/hpodbc \
-lhpodbc -o connect_test
• On IBM AIX® 64–bit:
g++ -mxaix64 connect_test.cpp -L/usr/lib -I/usr/include/hpodbc \
-lhpodbc64 -o connect_test
• On Sun SPARC® :
cc connect_test.cpp -I/usr/include/hpodbc -L/usr/lib \
-lhpodbc -o connect_test
• On Sun SPARC® 64–bit:
cc -xarch=v9a connect_test.cpp -I/usr/include/hpodbc -L/usr/lib \
-lhpodbc64 -o connect_test
3. Make sure that the data source is configured correctly. If needed, modify the
/etc/hpodbc/MXODSN file.
4. Run the sample program:
./connect_test -d data-source -u userid -p password
The output of successfully running the sample program is:
OUTPUT: Connect Test Passed...
40 Installing the HP Neoview ODBC Drivers