From: | Maarten Boekhold <maartenb(at)dutepp0(dot)et(dot)tudelft(dot)nl> |
---|---|
To: | "Vazsonyi Peter[ke]" <neko(at)kornel(dot)szif(dot)hu> |
Cc: | pgsql-hackers(at)postgreSQL(dot)org |
Subject: | Re: [HACKERS] libpq++ linking |
Date: | 1998-01-22 20:22:20 |
Message-ID: | Pine.SUN.3.91.980122212143.27856A-100000@dutepp0.et.tudelft.nl |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Thu, 22 Jan 1998, Vazsonyi Peter[ke] wrote:
> Hello!
>
> I try to use libpq++ (linux: redhat4.2, postgresql-(devel)?-6.2 GNU c)
> And i have problem with linking:
>
> [root(at)3dom neko]# g++ -I/usr/include/postgres/ -lpq++ -o a a.cc
> /tmp/cca032541.o: In function ain':
> /tmp/cca032541.o(.text+0x22): undefined reference to gConnection::Exec(char
> const *)'
> ...
> And more like this. But where is this famous exec?
>
> [root(at)3dom neko]# nm -C /usr/lib/libpq++.a | grep 'Exec(char'
> 00000348 T PgConnection::Exec(char const *)
> U PgConnection::Exec(char const *)
>
> All right. In libpq++.
> And I use this lib?
> [root(at)3dom neko]# mv /usr/lib/libpq++.a .
> [root(at)3dom neko]# g++ -I/usr/include/postgres/ -lpq -lpq++ -o e e.cc
> ld: cannot open -lpq++: No such file or directory
> Yes. We were use before this.
Try putting the -lpq++ *after* your input files, ie. last on the line.
Maarten
_____________________________________________________________________________
| Maarten Boekhold, Faculty of Electrical Engineering TU Delft, NL |
| Computer Architecture and Digital Technique section |
| M(dot)Boekhold(at)et(dot)tudelft(dot)nl |
-----------------------------------------------------------------------------
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 1998-01-22 21:25:19 | Re: [HACKERS] Oid Questions |
Previous Message | Keith Parks | 1998-01-22 20:08:20 | varchar() troubles. (S/Linux) |