From: Flemming Froekjaer <flemming@froekjaer.org>
To: pgsql-interfaces@postgresql.org
Subject: Problem linkint with libpq
Date: Fri, 27 Jul 2001 14:33:48 -0700
Message-ID: <3B61DE3C.1F8929FE@froekjaer.org> (raw)
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 </usr/local/include/pgsql/libpq-fe.h>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-interfaces@postgresql.org
Cc: flemming@froekjaer.org
Subject: Re: Problem linkint with libpq
In-Reply-To: <3B61DE3C.1F8929FE@froekjaer.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox