[freetds] ld: fatal: Symbol referencing errors....g++ -g -L.

Chaitanya B chaitanyap at knowsys.net
Thu Dec 2 08:47:37 EST 2004


Hi martin,

thank you for your reply....but actually i am clear, is that i have an
incompatibale version of the gcc compiler on solaris sparc 5.8....
I am very new to solaris ...so kindly  help me understand......how to link a
c library with an c++ program......
i had an error as given below also when using the libctiwf.a with my
program...
bash# gcc orgclient.cc -o orgclient

undefined                                            first referenced
 symbol                                                 in file
cti_open_connection(char*,Char*,int)     /var/tmp//ccPELfc.o
cti_open_connection(int)                      /var/tmp//ccPELfc.o
_gxx_personality_v0                           /var/tmp//ccPELfc.o

ld: fatal: Symbol referencing errors. No output written to orgclient
Collect2: ld return 1 exit status

cti_open_connection...is an funtion in the library....

kindly suggest me...

thankz ..
chaitanya
----- Original Message -----
From: "Martin Spott" <Martin.Spott at uni-duisburg.de>
Newsgroups: list.freetds
To: <freetds at lists.ibiblio.org>
Sent: Thursday, December 02, 2004 7:03 PM
Subject: Re: [freetds] ld: fatal: Symbol referencing errors....g++ -g -L.


> "Chaitanya B" wrote:
>
> > bash-2.03# g++ -g -L. orgClient.o -lctiwf
> > Undefined                       first referenced
> >  symbol                             in file
> > socket                              ./libctiwf.a(api.o)
> > recv                                ./libctiwf.a(api.o)
> > gethostbyname                       ./libctiwf.a(api.o)
>
> On Solaris you usually have to add -lsocket and/or -lnsl to programs
> that do communication over network. I'd use both: libsocket for
> 'socket' and libnsl for the rest  ;-)
>
> Martin.
> --
>  Unix _IS_ user friendly - it's just selective about who its friends are !
> --------------------------------------------------------------------------
> _______________________________________________
> FreeTDS mailing list
> FreeTDS at lists.ibiblio.org
> http://lists.ibiblio.org/mailman/listinfo/freetds
>



More information about the FreeTDS mailing list