README for the HP Neoview ODBC UNIX Drivers (Upd3 R2.3 SP2)
1. Move to the directory where you installed the sample program:
cd /etc/hpodbc/sample
2. Compile the sample program.
Note: All drivers, other than the 64-bit driver for HP-UX(IA-64), x86_64 Linux driver, and
IA-64 Linux are 32-bit drivers; therefore, applications need to be compiled accordingly.
• On x86 Linux:
g++ connect_test.cpp -L/usr/lib -I/usr/include/hpodbc -lhpodbc \
-o connect_test
Note: This Linux driver is a 32-bit driver. If you are using an x86-64 machine, you need
to explicitly compile your appplication as a 32-bit application. For example:
g++ connect_test.cpp -m32 -L/usr/lib \
-I/usr/include/hpodbc -lhpodbc -o connect_test
• On x86_64 Linux:
g++ connect_test.cpp -L/usr/lib -I/usr/include/hpodbc \
-lhpodbc64 -o connect_test
• On IA-64 Linux:
g++ connect_test.cpp -L/usr/lib -I/usr/include/hpobdc \
-lhpodbc -o connect_test
On IA-64 Linux, you will occasionally see warning messages like “unaligned access to
0xa00000020065805f, ip=0xa0000001002a48d1”
This warning can be ignored. To disable these warning messages, enter:
prctl --unaligned=silent
This command turns off all unaligned access warnings for that session.
For more information, see http://kbase.redhat.com/faq/FAQ_105_9111.shtm
• On HP-UX (IA-64):
aCC -AA connect_test.cpp -L/usr/lib -I/usr/include/hpodbc \
-lhpodbc -o connect_test -lm
To use cc for compiling and linking:
— Rename connect_test.cpp to connect_test.c.
— Run this command:
cc connect_test.c –I/usr/include/hpodbc –L/usr/lib \
-lhpodbc lstd_v2 -lCsup -lunwind -lm -o connect_test
Note: Multi-threaded applications should use the “-mt” compiler option. Non
multi-threaded applications that use ODBC asynchronous execution should ensure that
the pthread library is linked in and it is linked in ahead of the libc library.
• On HP-UX (IA-64) 64 bit:
aCC +DD64 -AA connect_test.cpp -L/usr/lib/hpux64 -I/usr/include/hpodbc \
-lhpodbc64 -o connect_test -lm
To use cc for compiling and linking:
— Rename connect_test.cpp to connect_test.c
— Run this command:
cc connect_test.c +DD64 –I/usr/include/hpodbc -L/usr/lib/hpux64 \
–lhpodbc64 –lstd_v2 -lCsup -lunwind -lm -lhpodbc -o connect_test
12