Thread: Compilation & Installation problem

Compilation & Installation problem

From
Namrata
Date:
Hi There,

I am using PostgreSQL on Solaris-8.
I am trying to use the library oc C/C++ which is compiled using GNU. I am trying to use that GNU compiled library with
theapplication which is being 
compiled with FORTE/CC of version 5.2. My application is not getting compiled with it.
It is giving me the following errors.

--------------------------------------------------------------------------------
/export/home/uxapps/forte/SUNWspro/bin/CC -I/uxapps/Postgres/postgresql-7.1/src/
include -I/uxapps/Postgres/postgresql-7.1/src/interfaces/libpq++ -I/uxapps/Postg
res/postgresql-7.1/src/interfaces -I/uxapps/Postgres/postgresql-7.1/src/interfac
es/libpq -I/uxapps/SSL/openssl/include -o btest2 btest2.cc -L/uxapps/Postgres/po
stgresql-7.1/src/interfaces/libpq++ -L/uxapps/SSL/openssl/include -L/uxapps/Post
gres/postgresql-7.1/src/interfaces/libpq -L/usr/local/lib -lpq++ -lstdc++ -lsock
et -lthread -lnsl -ldl
Undefined                       first referenced
 symbol                             in file
PgConnection::PgConnection #Nvariant 1(const char*)       btest2.o
PgConnection::~PgConnection #Nvariant 1()          btest2.o
const char*PgDatabase::GetValue(int,int)   btest2.o
int PgConnection::ConnectionBad() btest2.o
int PgDatabase::Tuples()         btest2.o
ExecStatusType PgConnection::Exec(const char*) btest2.o
int PgDatabase::GetLength(int,int)    btest2.o
const char*PgConnection::ErrorMessage() btest2.o
int PgDatabase::Fields()         btest2.o
ld: fatal: Symbol referencing errors. No output written to btest2
make: *** [btest2] Error 1
----------------------------------------------------------------------------------

Can anybody please help me on this.

As given in the document, it is necessary to compile the postgresl library using GNU make. But they have mentioned that
wecan use other compiler by 
using "env CC=$PATH/CC ./configure". But this option is also not working in my case. I want to compile my postgresl
libraryusing FORTE CC but unable 
to do it. so now I am trying to use GNU compiled library with my application which is being compiled with FORTE CC.

Please help me, I need urgent help on this.

Thanks in advance,
namrata.

Re: Compilation & Installation problem

From
Doug McNaught
Date:
Namrata <nlabade@nulinkinc.com> writes:

> I am using PostgreSQL on Solaris-8.  I am trying to use the library
> oc C/C++ which is compiled using GNU. I am trying to use that GNU
> compiled library with the application which is being compiled with
> FORTE/CC of version 5.2. My application is not getting compiled with
> it.  It is giving me the following errors.

I've found that trying to link gcc-compiled code with other code
compiled with the Sun compiler just doesn't work.  Compile everything
with one compiler and you'll have a lot fewer headaches.

-Doug
--
The rain man gave me two cures; he said jump right in,
The first was Texas medicine--the second was just railroad gin,
And like a fool I mixed them, and it strangled up my mind,
Now people just get uglier, and I got no sense of time...          --Dylan