When I write a simple program for accessing a device proxy in Cpp, like #include <tango.h>
#include <DeviceProxy.h>
using namespace Tango;
int main(unsigned int argc, char **argv)
{
// try
// {
//
// create a connection to a TANGO device
//
DeviceProxy *device = new DeviceProxy("ttyS0/port/1");
//
// Ping the device
//
device->ping();
ease: " << spr << endl;
// }
// catch (DevFailed &e)
// {
// Except::print_exception(e);
// exit(-1);
// }
}
When I compile it with command
$ g++ client.cpp -o first
It gives following error
client.cpp:(.text+0x2f): undefined reference to Tango::DeviceProxy::DeviceProxy(char const*, CORBA::ORB*)' /tmp/ccDn8erO.o: In function
__static_initialization_and_destruction_0(int, int)‘:
client.cpp:(.text+0xa4): undefined reference to omni_thread::init_t::init_t()' client.cpp:(.text+0xb9): undefined reference to
omni_thread::init_t::~init_t()’
client.cpp:(.text+0xcd): undefined reference to _omniFinalCleanup::_omniFinalCleanup()' client.cpp:(.text+0xe2): undefined reference to
_omniFinalCleanup::~_omniFinalCleanup()’
collect2: error: ld returned 1 exit status
Please any bode help me to remove out this error
Thanks
Bublee