Build issue with NDDS_STANDALONE_TYPE for C++11

4 posts / 0 new
Last post
cmb
Offline
Last seen: 4 years 4 months ago
Joined: 06/04/2020
Posts: 2
Build issue with NDDS_STANDALONE_TYPE for C++11

Using RTI Connext 6.0.0 with rtiddsgen 3.0.0, I've encountered a problem when trying to compile generated code for a standalone type (with NDDS_STANDALONE_TYPE). My environment is Linux 3.10 x86_64, with g++ 4.8.5. I have a single, very simple message defined in MsgTypeA.idl:

struct MsgTypeA
{
  int32 fieldA;
};

I generate code using rtiddsgen and put the result in the subdirectory msgs/:

rtiddsgen -d msgs -update typefiles -language C++11 -platform x64Linux3gcc4.8.2 MsgTypeA.idl

Attempt to compile object code for MsgTypeA.cxx and ndds_standalone_type.cxx:

g++ -Wall -Wextra -Wno-unused-parameter -O2 -std=c++11 -c \
  -DRTI_UNIX -DNDDS_STANDALONE_TYPE \
  -I/opt/rti_connext_dds-6.0.0/include \
  -I/opt/rti_connext_dds-6.0.0/include/ndds \
  -I/opt/rti_connext_dds-6.0.0/include/ndds/hpp \
  -I/opt/rti_connext_dds-6.0.0/resource/app/app_support/rtiddsgen/standalone/include \
  /opt/rti_connext_dds-6.0.0/resource/app/app_support/rtiddsgen/standalone/src/ndds_standalone_type.cxx \
  msgs/MsgTypeA.cxx

...results in the following error:

msgs/MsgTypeA.cxx:234:44: error: specializing member 'rti::topic::dynamic_type::get' requires 'template<>' syntax
    const dds::core::xtypes::StructType& dynamic_type::get()

Am I misusing rtiddsgen somehow? I could understand the absence of "template<>" generating an error due to a g++ incompatibility, but it seems that the generated code for dynamic_type<MsgTypeA>::get() is calling native_type_code<MsgTypeA>::get(), which is only defined inside a block of code that does not get compiled when NDDS_STANDALONE_TYPE is turned on. Any ideas?

--Colin

Offline
Last seen: 1 week 17 hours ago
Joined: 04/02/2013
Posts: 196

Hi Colin,

Standalone types are not currently supported in the modern C++ API (-language C++11). This issue is internally tracked as CODEGENII-1101.

Alex

 

cmb
Offline
Last seen: 4 years 4 months ago
Joined: 06/04/2020
Posts: 2

Standalone types are not currently supported in the modern C++ API (-language C++11).

Is this also true for the rtiddsgen C++03 language option? (-language C++03) I see the same issue with that.

Offline
Last seen: 1 week 17 hours ago
Joined: 04/02/2013
Posts: 196

Yes, -language C++03 uses the Modern C++ API as well (but with C++11 features disabled).