> Ashish Gupta wrote:
>
> hi everybody,
>
> I am using postgresql database comfortably through java/JDBC. I intend
> to use this database through C++ programs and i get this error when i
> compile the sample program for libpq++
>
> g++ -I/usr/local/pgsql/include
> -I/root/ashish/postgresql-7.1.3/src/interfaces/ -o testlibpq0
> testlibpq0.cc -L/usr/local/pgsql/lib -lpq++
> /usr/bin/ld: cannot find -lpq++
> collect2: ld returned 1 exit status
>
> can anybody guide me why this error is coming......
Sounds like the library is not on the directory you think it is;
on my system (an out-of-the-box RedHat), the library is located
on the default lib path (/usr/lib/libpq++.so.*); so, you might
try a:
find /usr -name "libpq++*"
To figure out where it is, then adjust the -L switch accordingly.
HTH,
Carlos
--