Compiler error with libpq++

Started by Wenjin Zhengover 25 years ago2 messages
#1Wenjin Zheng
wenjin.zheng@lsbc.com

Hi;

I am using libpq++ and Standard Template Library to write some programs for
postgres6.5. I am trying to use map template to store tuples retrieved from
postresql database. I defined map<string, vector<string> > in my program:
typedef map<string, vector<string> > SQL_Map;

If I did not include <libpq++.H> and did not use link option from the make
file used in libpq++, also I did not use any class from libpq++.H.
Everything is fine, I can compile the class fine. I simply use "g++ -c
myclass.cpp" and generate myclass.o file. However if I include <libpq++.H>
and use the makefile come with libpq++ compiling option, I got an error as:
"/usr/ccs/bin/as: "/var/tmp/cc00POXR.s", line 3512: error: can't compute
value of an expression involving an external symbol"

I believe it has something to do with using string as the key for the map
and using libpq++.H at the same time, because
map<int, vector<string> > is fine, but I don't know what is the problem.
Could anyone help me out? Your help will be greatly appreciated.

Sincerely

Wenjin Zheng, Ph.D.
Bioinformatic Analyst
Large Scale Biology, Corp.
Vacaville, CA 95688
wenjin.zheng@lsbc.com

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Wenjin Zheng (#1)
Re: Compiler error with libpq++

Wenjin Zheng <wenjin.zheng@lsbc.com> writes:

I am using libpq++ and Standard Template Library to write some programs for
postgres6.5.

The symptoms you describe aren't familiar to me, but just on general
principles I'd recommend updating to postgres 7.0. We did clean up the
libpq++ include files since 6.5, and that might help.

regards, tom lane