Quote:
|
Originally Posted by UDBStudent
But following command gives errors :
gcc myprogram.c -Wall -I/opt/IBM/db2/V9.1/include \
-L/database1/db2home/db2inst3/sqllib/lib \
-ldb2
-Wl,-rpath, /opt/IBM/db2/V9.1
|
Just leave out the rpath, and set LD_LIBRARY_PATH to /opt/IBM/db2/V9.1
Or maybe this is not even necessary; depends on the platform.
If I'm not mistaken this only works on Solaris, and is only needed if the db2 library is a shared lib (db2.so), not if it's a static one (db2.a).