From: | Einar Karttunen <ekarttun(at)cs(dot)Helsinki(dot)FI> |
---|---|
To: | Olivier Cherrier <Olivier(dot)Cherrier(at)cediti(dot)be> |
Cc: | "'zilch(at)home(dot)se'" <zilch(at)home(dot)se>, <pgsql-general(at)postgresql(dot)org> |
Subject: | RE: libpq compile error |
Date: | 2001-06-11 07:46:48 |
Message-ID: | Pine.LNX.4.33.0106111042220.4145-100000@kissaholmen.cs.Helsinki.FI |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Fri, 8 Jun 2001, Olivier Cherrier wrote:
> >> bash-2.04$ gcc -v -I/usr/local/include/postgresql/ -o
> >testlibpq testlibpq.c
> >
> >Now tell yourself where do you tell the compiler where all the
> >postgresql
> >code is! The compiler itself wont give you the code for all
> >your postgresql
> >specific function calls.
> >
> >try add "-lpq" to the end of the line.
>
>
> Unfortunately, It doesn't help:
>
> <<
> bash-2.04$ gcc -I/usr/local/include/postgresql/ -o testlibpq testlibpq.c
> -lpq
> ld: -lpq: no match
> collect2: ld returned 1 exit status
> bash-2.04$
> >>
gcc -o testlibpq testlibpq.c -Iinclude_dir -Llib_dir -lpq
include_dir is the directory containing pgsql header files (*.h).
lib_dir is the directory containing pgsql libraries (eg. libpq.so)
You can locate the libdir by find / -name 'libpq.so*'
- Einar Karttunen
From | Date | Subject | |
---|---|---|---|
Next Message | Martín Marqués | 2001-06-11 08:19:31 | ORDER BY what? |
Previous Message | Martín Marqués | 2001-06-11 05:25:59 | Re: something smells bad |