Received: from sleipner.eiffel.dk (sub19-229.member.dsl-only.net [63.105.19.229]) by postgresql.org (8.11.3/8.11.1) with ESMTP id f6RLYFf68220 for ; Fri, 27 Jul 2001 17:34:15 -0400 (EDT) (envelope-from flemming@froekjaer.org) Received: from froekjaer.org (sub19-225.member.dsl-only.net [63.105.19.225]) by sleipner.eiffel.dk (8.11.1/8.11.1) with ESMTP id f6RLar581958 for ; Fri, 27 Jul 2001 14:36:53 -0700 (PDT) (envelope-from flemming@froekjaer.org) Message-ID: <3B61DE3C.1F8929FE@froekjaer.org> Date: Fri, 27 Jul 2001 14:33:48 -0700 From: Flemming Froekjaer X-Mailer: Mozilla 4.77 [en] (X11; U; Linux 2.2.12 i386) X-Accept-Language: en MIME-Version: 1.0 To: pgsql-interfaces@postgresql.org Subject: Problem linkint with libpq Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Archive-Number: 200107/106 X-Sequence-Number: 1860 I'm trying to compile a small c program that integrates with PostgreSQL, but when I get to link the prog i get the following error. /tmp/ccFrRISc.o: In function `main': /tmp/ccFrRISc.o(.text+0x57): undefined reference to `PQsetdbLogin' I'm doing this on FreeBSD 4.3 and PostgreSQL is 7.1.2 I made this prog to determin that what causes the problem: #include int main (void) { char *pghost, *pgport, *pgoptions, *pgtty, *dbUser, *dbPassword; char *dbName; int nFields; int i, j; PGconn *conn; pghost = "localhost"; pgport = "5432"; pgoptions = NULL; pgtty = NULL; dbName = "monitor"; dbUser = "username"; dbPassword = "donttell"; conn = PQsetdbLogin(pghost, pgport, pgoptions, pgtty, dbName, dbUser, dbPassword); return(0); } \Flemming