Skip to Content.
Sympa Menu

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

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "Chaitanya B" <chaitanyap AT knowsys.net>
  • To: "FreeTDS Development Group" <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] ld: fatal: Symbol referencing errors....g++ -g -L.
  • Date: Thu, 2 Dec 2004 19:17:37 +0530

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
>





Archive powered by MHonArc 2.6.24.

Top of Page