troubles with C

Поиск
Список
Период
Сортировка
От Mario Molfese
Тема troubles with C
Дата
Msg-id E337BE8392C28B4CBAA21852AA916D6956F457@io.interzen.it
обсуждение исходный текст
Список 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

В списке pgsql-odbc по дате отправления:

Предыдущее
От: "Dave Page"
Дата:
Сообщение: Re: ODBC2.5 Driver build error
Следующее
От: "Dave Page"
Дата:
Сообщение: Re: Time for an 07.03.0001 Release?