You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@thrift.apache.org by Arkaitz <ar...@gmail.com> on 2010/05/24 15:51:29 UTC
Default example not linking
Hi all,
I'm using incubation 0.2.0 tarball available in the webpage and not
modifying the skeleton file.
Any workaround for this?
_____________________
namespace cpp Test
service Something {
i32 ping()
}
------------------------------------
g++ -o Something Something_server.skeleton.cpp -I
../../../deps/thrift/build/include/thrift
../../../deps/thrift/build/lib/libthrift.a
/tmp/ccZVIJlC.o: In function
`Test::SomethingProcessor::SomethingProcessor(boost::shared_ptr<Test::SomethingIf>)':
Something_server.skeleton.cpp:(.text._ZN4Test18SomethingProcessorC1EN5boost10shared_ptrINS_11SomethingIfEEE[Test::SomethingProcessor::SomethingProcessor(boost::shared_ptr<Test::SomethingIf>)]+0x13):
undefined reference to `vtable for Test::SomethingProcessor'
Something_server.skeleton.cpp:(.text._ZN4Test18SomethingProcessorC1EN5boost10shared_ptrINS_11SomethingIfEEE[Test::SomethingProcessor::SomethingProcessor(boost::shared_ptr<Test::SomethingIf>)]+0x27):
undefined reference to `vtable for Test::SomethingProcessor'
Something_server.skeleton.cpp:(.text._ZN4Test18SomethingProcessorC1EN5boost10shared_ptrINS_11SomethingIfEEE[Test::SomethingProcessor::SomethingProcessor(boost::shared_ptr<Test::SomethingIf>)]+0x8d):
undefined reference to `Test::SomethingProcessor::process_ping(int,
apache::thrift::protocol::TProtocol*, apache::thrift::protocol::TProtocol*)'
Thanks
--
Arkaitz
Re: Default example not linking
Posted by Arkaitz <ar...@gmail.com>.
Hi,
2010/5/24 Łukasz Michalik <lm...@ift.uni.wroc.pl>
> On 15:20 2010-05-24 +0100, Arkaitz wrote:
> > Hey,
> > I did forget to add constants and types, but the result after adding them
> is
> > the same.
> > Could someone confirm that this works please?
> >
> > g++-4.3 -o Something Something_server.skeleton.cpp
> media_service_types.cpp
> > media_service_constants.cpp -I ../../../deps/thrift/build/include/thrift
>
> Still missing Something.cpp.
>
Right, I took all the time Somtething_server.skeleton.cpp for Something.cpp
implementation so it never worked!
Perfect now, thanks, and sorry.
Arkaitz
Re: Default example not linking
Posted by Łukasz Michalik <lm...@ift.uni.wroc.pl>.
On 15:20 2010-05-24 +0100, Arkaitz wrote:
> Hey,
> I did forget to add constants and types, but the result after adding them is
> the same.
> Could someone confirm that this works please?
>
> g++-4.3 -o Something Something_server.skeleton.cpp media_service_types.cpp
> media_service_constants.cpp -I ../../../deps/thrift/build/include/thrift
Still missing Something.cpp.
> ../../../deps/thrift/build/lib/libthrift.a
> /tmp/ccq2zpq9.o: In function
> `Test::SomethingProcessor::SomethingProcessor(boost::shared_ptr<Test::SomethingIf>)':
> Something_server.skeleton.cpp:(.text._ZN4Test18SomethingProcessorC1EN5boost10shared_ptrINS_11SomethingIfEEE[Test::SomethingProcessor::SomethingProcessor(boost::shared_ptr<Test::SomethingIf>)]+0x14):
> undefined reference to `vtable for Test::SomethingProcessor'
> Something_server.skeleton.cpp:(.text._ZN4Test18SomethingProcessorC1EN5boost10shared_ptrINS_11SomethingIfEEE[Test::SomethingProcessor::SomethingProcessor(boost::shared_ptr<Test::SomethingIf>)]+0x28):
> undefined reference to `vtable for Test::SomethingProcessor'
> Something_server.skeleton.cpp:(.text._ZN4Test18SomethingProcessorC1EN5boost10shared_ptrINS_11SomethingIfEEE[Test::SomethingProcessor::SomethingProcessor(boost::shared_ptr<Test::SomethingIf>)]+0x8e):
> undefined reference to `Test::SomethingProcessor::process_ping(int,
> apache::thrift::protocol::TProtocol*, apache::thrift::protocol::TProtocol*)'
> collect2: ld returned 1 exit status
>
--
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet and in e-mail?
Pozdrawiam,
Łukasz P. Michalik
Re: Default example not linking
Posted by Arkaitz <ar...@gmail.com>.
Hey,
I did forget to add constants and types, but the result after adding them is
the same.
Could someone confirm that this works please?
g++-4.3 -o Something Something_server.skeleton.cpp media_service_types.cpp
media_service_constants.cpp -I ../../../deps/thrift/build/include/thrift
../../../deps/thrift/build/lib/libthrift.a
/tmp/ccq2zpq9.o: In function
`Test::SomethingProcessor::SomethingProcessor(boost::shared_ptr<Test::SomethingIf>)':
Something_server.skeleton.cpp:(.text._ZN4Test18SomethingProcessorC1EN5boost10shared_ptrINS_11SomethingIfEEE[Test::SomethingProcessor::SomethingProcessor(boost::shared_ptr<Test::SomethingIf>)]+0x14):
undefined reference to `vtable for Test::SomethingProcessor'
Something_server.skeleton.cpp:(.text._ZN4Test18SomethingProcessorC1EN5boost10shared_ptrINS_11SomethingIfEEE[Test::SomethingProcessor::SomethingProcessor(boost::shared_ptr<Test::SomethingIf>)]+0x28):
undefined reference to `vtable for Test::SomethingProcessor'
Something_server.skeleton.cpp:(.text._ZN4Test18SomethingProcessorC1EN5boost10shared_ptrINS_11SomethingIfEEE[Test::SomethingProcessor::SomethingProcessor(boost::shared_ptr<Test::SomethingIf>)]+0x8e):
undefined reference to `Test::SomethingProcessor::process_ping(int,
apache::thrift::protocol::TProtocol*, apache::thrift::protocol::TProtocol*)'
collect2: ld returned 1 exit status
Thanks
--
Arkaitz
2010/5/24 Łukasz Michalik <lm...@ift.uni.wroc.pl>
> On 14:51 2010-05-24 +0100, Arkaitz wrote:
> > Hi all,
> >
> > I'm using incubation 0.2.0 tarball available in the webpage and not
> > modifying the skeleton file.
> >
> > Any workaround for this?
> >
> > _____________________
> > namespace cpp Test
> >
> > service Something {
> > i32 ping()
> > }
> > ------------------------------------
> >
> >
> > g++ -o Something Something_server.skeleton.cpp -I
> > ../../../deps/thrift/build/include/thrift
> > ../../../deps/thrift/build/lib/libthrift.a
> > /tmp/ccZVIJlC.o: In function
> >
> `Test::SomethingProcessor::SomethingProcessor(boost::shared_ptr<Test::SomethingIf>)':
> >
> Something_server.skeleton.cpp:(.text._ZN4Test18SomethingProcessorC1EN5boost10shared_ptrINS_11SomethingIfEEE[Test::SomethingProcessor::SomethingProcessor(boost::shared_ptr<Test::SomethingIf>)]+0x13):
> > undefined reference to `vtable for Test::SomethingProcessor'
> >
> Something_server.skeleton.cpp:(.text._ZN4Test18SomethingProcessorC1EN5boost10shared_ptrINS_11SomethingIfEEE[Test::SomethingProcessor::SomethingProcessor(boost::shared_ptr<Test::SomethingIf>)]+0x27):
> > undefined reference to `vtable for Test::SomethingProcessor'
> >
> Something_server.skeleton.cpp:(.text._ZN4Test18SomethingProcessorC1EN5boost10shared_ptrINS_11SomethingIfEEE[Test::SomethingProcessor::SomethingProcessor(boost::shared_ptr<Test::SomethingIf>)]+0x8d):
> > undefined reference to `Test::SomethingProcessor::process_ping(int,
> > apache::thrift::protocol::TProtocol*,
> apache::thrift::protocol::TProtocol*)'
>
> You didn't compile and link in other generated sources. That probably
> means Something.cpp, something_types.cpp and something_constants.cpp
> in your case.
>
> >
> > Thanks
> >
> > --
> > Arkaitz
>
> --
> Pozdrawiam,
> Łukasz P. Michalik
>
Re: Default example not linking
Posted by Łukasz Michalik <lm...@ift.uni.wroc.pl>.
On 14:51 2010-05-24 +0100, Arkaitz wrote:
> Hi all,
>
> I'm using incubation 0.2.0 tarball available in the webpage and not
> modifying the skeleton file.
>
> Any workaround for this?
>
> _____________________
> namespace cpp Test
>
> service Something {
> i32 ping()
> }
> ------------------------------------
>
>
> g++ -o Something Something_server.skeleton.cpp -I
> ../../../deps/thrift/build/include/thrift
> ../../../deps/thrift/build/lib/libthrift.a
> /tmp/ccZVIJlC.o: In function
> `Test::SomethingProcessor::SomethingProcessor(boost::shared_ptr<Test::SomethingIf>)':
> Something_server.skeleton.cpp:(.text._ZN4Test18SomethingProcessorC1EN5boost10shared_ptrINS_11SomethingIfEEE[Test::SomethingProcessor::SomethingProcessor(boost::shared_ptr<Test::SomethingIf>)]+0x13):
> undefined reference to `vtable for Test::SomethingProcessor'
> Something_server.skeleton.cpp:(.text._ZN4Test18SomethingProcessorC1EN5boost10shared_ptrINS_11SomethingIfEEE[Test::SomethingProcessor::SomethingProcessor(boost::shared_ptr<Test::SomethingIf>)]+0x27):
> undefined reference to `vtable for Test::SomethingProcessor'
> Something_server.skeleton.cpp:(.text._ZN4Test18SomethingProcessorC1EN5boost10shared_ptrINS_11SomethingIfEEE[Test::SomethingProcessor::SomethingProcessor(boost::shared_ptr<Test::SomethingIf>)]+0x8d):
> undefined reference to `Test::SomethingProcessor::process_ping(int,
> apache::thrift::protocol::TProtocol*, apache::thrift::protocol::TProtocol*)'
You didn't compile and link in other generated sources. That probably
means Something.cpp, something_types.cpp and something_constants.cpp
in your case.
>
> Thanks
>
> --
> Arkaitz
--
Pozdrawiam,
Łukasz P. Michalik