Arindam Haldar <arindamhaldar@hotpop.com> writes:
> on my RedHat 7.2 i have inserted these lines in the file /etc/ld.so.conf
> /usr/lib/pgsql-7.2
This may or may not be necessary, but if you do it you need to run
'ldconfig' in order for it to take effect.
> using gcc -lpq egtry.c gives error-->
> /usr/bin/ld: cannot find -lpq
> collect2: ld reurned 1 exit status
You need to add a -L flag to the compile so gcc looks in the right
place for libraries. Also, the '-lpq' should go *after* your source
file name. So:
gcc -o egtry egtry.c -L/usr/lib/pgsql-7.2 -lpq
That should get you a lot closer to working.
-Doug