pgsql and lion : not taking good header at compilation. - Mailing list pgsql-novice

From Pierre-Henry Frohring
Subject pgsql and lion : not taking good header at compilation.
Date
Msg-id 404DAC23-6BA0-4172-92DD-C3CBE3056356@gmail.com
Whole thread Raw
Responses 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>)
List 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 by date:

Previous
From: Lew
Date:
Subject: Re: "SHOW GRANTS FOR username" or why \z is not enough for me
Next
From: Tom Lane
Date:
Subject: Re: pgsql and lion : not taking good header at compilation.