thrift-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Prasanna Ponnada <ponn...@gmail.com>
Subject Re: Undefined reference errors when attempting to link with Thrift
Date Thu, 19 Jul 2012 01:24:39 GMT
On Wed, Jul 18, 2012 at 5:48 PM, Tanner Swett <swettt@mail.gvsu.edu> wrote:
> Hi,
>
> I'm trying to write a C++ application that uses Thrift. When I attempt
> to build it, however, I get a bunch of error messages saying that
> certain references to Thrift-related things are undefined. Here is the
> full output of my g++ command: http://pastie.org/4280898
>
> The build command itself is: g++ -Wall -o parcv_server
> -DHAVE_NETINET_IN_H -DHAVE_INTTYPES_H -I/usr/local/include/thrift
> -lopencv_core -lopencv_contrib -lthrift parcv_constants.cpp
> parcv_server.cpp parcv_types.cpp ParCV.cpp
>
> Here's my main() function: http://pastie.org/4280905
>
> libthrift.so is in /usr/local/lib/libthrift.so, and it does not appear
> to contain any symbol with "TNonblockingServer" in it.

On a system with pkg-config, something like this for glib would do:
root@htgt:~# pkg-config --cflags thrift_c_glib
-I/usr/local/include/thrift -I/usr/include/glib-2.0
-I/usr/lib/x86_64-linux-gnu/glib-2.0/include
root@htgt:~# pkg-config --libs thrift_c_glib
-L/usr/local/lib -lthrift_c_glib -lgobject-2.0 -lglib-2.0

thanks
Prasanna

Mime
View raw message