| From: | Doug McNaught <doug(at)wireboard(dot)com> |
|---|---|
| To: | Arindam Haldar <arindamhaldar(at)hotpop(dot)com> |
| Cc: | Ted Petrosky <tedpet(at)symcom(dot)com>, pgsql-interfaces(at)postgresql(dot)org, pgsql-general(at)postgresql(dot)org, kalelkar(at)hotmail(dot)com |
| Subject: | Re: [INTERFACES] C & C ++Program Problem |
| Date: | 2002-05-16 12:49:02 |
| Message-ID: | m3y9ekb6m9.fsf@varsoon.wireboard.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general pgsql-interfaces |
Arindam Haldar <arindamhaldar(at)hotpop(dot)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
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Peter Gibbs | 2002-05-16 12:57:40 | Re: Lexicographic index ? |
| Previous Message | Arindam Haldar | 2002-05-16 12:19:17 | Re: [INTERFACES] C & C ++Program Problem |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Nigel J. Andrews | 2002-05-16 22:49:18 | libpgtcl - backend version information patch |
| Previous Message | Arindam Haldar | 2002-05-16 12:19:17 | Re: [INTERFACES] C & C ++Program Problem |