Re: really simple example of c-code and pqlib library - Mailing list pgsql-novice

From Michael Fuhr
Subject Re: really simple example of c-code and pqlib library
Date
Msg-id 20060624194202.GA9916@winnie.fuhr.org
Whole thread Raw
In response to really simple example of c-code and pqlib library  (Waldemar Biernacki <wb@sao.pl>)
List pgsql-novice
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

pgsql-novice by date:

Previous
From: "pablo sebastian rodriguez"
Date:
Subject: using vars in scripts
Next
From: Richard Broersma Jr
Date:
Subject: Re: Copy Data Question