pgsql and lion : not taking good header at compilation.

Поиск
Список
Период
Сортировка
От Pierre-Henry Frohring
Тема pgsql and lion : not taking good header at compilation.
Дата
Msg-id 404DAC23-6BA0-4172-92DD-C3CBE3056356@gmail.com
обсуждение исходный текст
Ответы Re: pgsql and lion : not taking good header at compilation.  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: pgsql and lion : not taking good header at compilation.  (James Hartley <jjhartley@gmail.com>)
Список pgsql-novice
Hello,

I'm doing my first steps with postgre, and it seems that the Lion (10.7.4) install of postgre interferes with my install of postgre (9.1.4).

Here's a sample of the program i'm writing:

------------------------------------------------------------------------
int main () 
{

  // Params of connection to establish
  const char * keywords[] = {"dbname", "user", '\0'};
  const char * values[] = {"mydb", "postgresDB", '\0'};

  // Check server state
  switch (PQpingParams (keywords, values, 0))
    {
        // some stuff
    }
...
}
------------------------------------------------------------------------

Here the error message :
------------------------------------------------------------------------
g++ db_test.o -o db_test -L /usr/local/pgsql/bin -lpq
Undefined symbols for architecture x86_64:
  "_PQpingParams", referenced from:
      _main in db_test.o
ld: symbol(s) not found for architecture x86_64
------------------------------------------------------------------------

My guess :  g++ compile with the "old" version of postgre because if i remove PQpingParams (introduced in 9.1), it compiles.

My question : how to compile with my install of postgre ? 

(my install is standard :  
./configure
gmake
su
gmake install
)


Many thinks for giving me a hand on this one!
Pierre

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

Предыдущее
От: Lew
Дата:
Сообщение: Re: "SHOW GRANTS FOR username" or why \z is not enough for me
Следующее
От: Tom Lane
Дата:
Сообщение: Re: pgsql and lion : not taking good header at compilation.