troubles with C

From: Mario Molfese <mario(dot)molfese(at)interzen(dot)it>
To: "'pgsql-odbc(at)postgresql(dot)org'" <pgsql-odbc(at)postgresql(dot)org>
Subject: troubles with C
Date: 2003-05-15 07:56:09
Message-ID: E337BE8392C28B4CBAA21852AA916D6956F457@io.interzen.it
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-odbc

Hi folks,

I’ve a Debian Linux Machine on which are installed

odbc-postgresq 7.2.1-2woody2

postgresql 7.2.1-2woody2

postgresql-dev 7.2.1-2woody2

on this machine i cannot compile this C source code

#include <stdio.h>

#include <postgresql/libpq-fe.h>

int main() {

char *PQhost, *PQport, *PQoptions, *PQtty, *PQDBname;

PGconn *CN;

PGresult *RS;

PQhost = NULL;

PQport = NULL;

PQoptions = NULL;

PQtty = NULL;

PQDBname = "testdb";

CN = PQsetdb(PQhost, PQport, PQoptions, PQtty, PQDBname);

printf("%d\n", PQstatus(CN));

return 1;

};

gcc says to me

/tmp/ccYjFLoB.o: In function `main':

/tmp/ccYjFLoB.o(.text+0x45): undefined reference to `PQsetdbLogin'

/tmp/ccYjFLoB.o(.text+0x5c): undefined reference to `PQstatus'

collect2: ld returned 1 exit status

it seems like it is not able to recognize the postgresql functions called by
PQsetdb, but this make no sense. or no ?

please someone help me !

thanks in advance

Mario

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.480 / Virus Database: 276 - Release Date: 12/05/2003

Browse pgsql-odbc by date

  From Date Subject
Next Message Dave Page 2003-05-15 09:10:36 Re: Time for an 07.03.0001 Release?
Previous Message Dave Page 2003-05-15 07:21:41 Re: ODBC2.5 Driver build error