Re: [INTERFACES] Re: Postgres and port unavailable?
От | Peter T Mount |
---|---|
Тема | Re: [INTERFACES] Re: Postgres and port unavailable? |
Дата | |
Msg-id | Pine.LNX.3.95.980417174047.29749C-100000@maidast.demon.co.uk обсуждение исходный текст |
Ответы |
Re: [INTERFACES] Re: Postgres and port unavailable?
|
Список | pgsql-interfaces |
On Thu, 16 Apr 1998, matthew e perkowski cis stnt wrote: > Hello, > > > I can create a database and gave worked with my template1 database. Now, I > want to test the LIBPQ interface with testclib.c. I can compile and run > c/c++ programs, start the postmaster, and use psql successfully. Question: > when I want to compile the testclib.c program( I made sure my header files > in the program were in the correct place and were referred to correctly) > with my command line: > > gcc testclib.c -I/usr/include/pgsql -L/usr/include/pgsql/lib -o project Youre missing -lpq. the -L only defines where the libraries are located, but doesn't tell the linker which ones to use. gcc testclib.c -I/usr/include/pgsql -L/usr/include/pgsql/lib -lpq -o project That should work -- Peter T Mount petermount@earthling.net or pmount@maidast.demon.co.uk Main Homepage: http://www.demon.co.uk/finder Work Homepage: http://www.maidstone.gov.uk Work EMail: peter@maidstone.gov.uk
В списке pgsql-interfaces по дате отправления: