On Sat, Jun 24, 2006 at 10:29:27AM +0200, Waldemar Biernacki wrote:
> c++ \
> -I/usr/include/postgresql \
> -I/usr/include/postgresql/libpq \
> -L/usr/lib/libpq.a \
> test.cpp -o x
Check your compiler's documentation, but the -L option generally
takes a directory argument, not a file. On most systems /usr/lib
is searched automatically, so if that's where libpq is then you
shouldn't need -L at all. To link your program against libpq use
-lpq. See "Building libpq programs" for more information:
http://www.postgresql.org/docs/8.1/interactive/libpq-build.html
--
Michael Fuhr