1

When I add an idl project in redhawk following the steps below:

$ ./reconf
$ ./configure
$ sudo make
$ sudo make install

I can find the newly added idl file in the REDHAWK Target SDR directory.

REDHAWK Target SDR

When testing whether the idl file can be called, I have added the header file and have already called the function interface, but at compile time, the error is: undefined reference to 'xxxxxxxx' eg:

#include <redhawk/XH_IDL_TEST/xh_idl_test.h>
class data_t_test_base : public Component, protected ThreadedComponent
{
    public:
        data_t_test_base(const char *uuid, const char *label);
        ~data_t_test_base();
        void start() throw (CF::Resource::StartError, CORBA::SystemException);
        void stop() throw (CF::Resource::StopError, CORBA::SystemException);
        void releaseObject() throw (CF::LifeCycle::ReleaseError,CORBA::SystemException);
        void loadProperties();
 protected:
        xh_idl_test::_objref_dataChar *XH;
   private:
}

errors:

/home/sca/sca_com/data_t_test/cpp/data_t_test.cpp:21: undefined reference to `xh_idl_test::_objref_dataChar::pushPacket()'

May I ask how to solve this problem?

Daniel A. White
  • 187,200
  • 47
  • 362
  • 445
Hangxie
  • 11
  • 1

1 Answers1

1

In REDHAWK, IDL is accessed through ports, either uses (output) or provides (input). Once the IDL project is installed in your system, on component add a Port. Edit the port's interface by clicking on "Browse...". On the "Select and interface" menu, click "Show all interfaces", and then select the interface you want.

In the case of either input or output ports, the appropriate stubs will be generated.

Max Robert
  • 86
  • 2