thrift-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Casagrande, Norman" <nor...@last.fm>
Subject RE: Does the link sequence of libthrift.a and libthriftnb.a matters?
Date Fri, 07 May 2010 10:49:35 GMT
That's how the (gcc) linker works. It needs to know what are the objects required before looking
for them, therefore order is important.
See also http://www.network-theory.co.uk/docs/gccintro/gccintro_18.html

--
Norman Casagrande
Head of Music Research
last.fm

> -----Original Message-----
> From: zd.wbh [mailto:zd.wbh@163.com]
> Sent: 07 May 2010 07:51
> To: thrift-user
> Subject: Does the link sequence of libthrift.a and libthriftnb.a
> matters?
> 
> hi, all
> 
>    We encounter an odd link error today:
> 
> ./src/transport/TBufferTransports.h:452: undefined reference to `vtable
> for apache::thrift::transport::TMemoryBuffer'
> /usr/local/thrift/lib/libthriftnb.a(libthriftnb_la-
> TNonblockingServer.o)(.text+0x253e): In function
> `apache::thrift::server::TConnection::transition()':
> 
>   Normally, the "undefined reference of vtable" error arise from not
> implementing pure virtual functions, but not in our case. Finally we
> tried to exchange the link order of the two lib and get resolved.
> libthriftnb.a must be ahead of libthrift.a? Can somebody explains this
> to me? Thanks a lot.
Mime
View raw message