[Debian] Compilation problem

15 views
Skip to first unread message

Visionweb

unread,
Nov 10, 2009, 11:11:33 AM11/10/09
to Protocol Buffers
Hello,

I have a programm test that I can't compile under Debian, with g++.
The same programm is runing with my Ubuntu, and eclipse. Now, I try to
compile it under Debian, with g++ (command line). But I have this
error:

g++ -o udp_client udp_client.cpp
/tmp/ccaUFigk.o: In function `main':
udp_client.cpp:(.text+0x1cf): undefined reference to
`test::Tube_Info::Tube_Info()'
udp_client.cpp:(.text+0x570): undefined reference to
`google::protobuf::MessageLite::SerializeToString
(std::basic_string<char, std::char_traits<char>, std::allocator<char>
>*) const'
udp_client.cpp:(.text+0x6f7): undefined reference to
`test::Tube_Info::~Tube_Info()'
collect2: ld returned 1 exit status

What I have forget?

Regards.
Olivier

Evan Jones

unread,
Nov 10, 2009, 1:34:42 PM11/10/09
to Visionweb, Protocol Buffers

You need to include the .cpp file that defines the Tube_Info class, or a
.o that has a compiled version of it. You may wish to read:

http://pages.cs.wisc.edu/~beechung/ref/gcc-intro.html


Evan

--
Evan Jones
http://evanjones.ca/

Reply all
Reply to author
Forward
0 new messages