Build error on IDL generated C++11 code - no user code

6 posts / 0 new
Last post
Offline
Last seen: 2 years 10 months ago
Joined: 12/13/2021
Posts: 4
Build error on IDL generated C++11 code - no user code

Hi there,

I’ve been fighting this build error for some time, which is emitted from inside the RTI DDS code when compiling only generated code.

I need to use the C++11 language option as I need to use the Modern C++ API.

The IDL “basictypes” consists of a hierarchy of simple nested structures with primitive types, no enums or anything special.

I need to add that this issue is not limited to only that single IDL generated file, all C++11 generated files produce this kind of compilation error. The other binding targets, e.g. plain C++, and C++ w/namespaces seem to compile fine, only C++11 target is problemamtic. No user code is added, purely generated code to be compiled into a DLL.


The build env is Linux Debian, compiler is gcc v8.3.1.


The issue is a series of compile errors that look as attached below on one of the generated file.

Searching through this forum yielded results not applicable for this problem.

Are there any definitions (#define) required for compiler to go through the right paths of the RTI’s code?

I would expect that the generated code would be squeaky clean, certainly not failing with obscure messages that a mortal user has got little chance to figure out.

Please help with this. Below is the compile output log.

Thank you in advance

Kind regards

Gabe L.

 

//--[build output]-------------

Compile

   [C++]          basictypes.cxx

   [C++]          basictypesPlugin.cxx

In file included from /usr/dds/include/ndds/hpp/rti/core/policy/CorePolicy.hpp:48,

                 from /usr/dds/include/ndds/hpp/dds/core/policy/detail/CorePolicy.hpp:26,

                 from /usr/dds/include/ndds/hpp/dds/core/policy/CorePolicy.hpp:27,

                 from /usr/dds/include/ndds/hpp/rti/domain/qos/DomainParticipantQosImpl.hpp:26,

                 from /usr/dds/include/ndds/hpp/dds/domain/qos/detail/DomainParticipantQos.hpp:27,

                 from /usr/dds/include/ndds/hpp/dds/domain/qos/DomainParticipantQos.hpp:26,

                 from /usr/dds/include/ndds/hpp/dds/domain/TDomainParticipant.hpp:32,

                 from /usr/dds/include/ndds/hpp/dds/domain/detail/DomainParticipant.hpp:26,

                 from /usr/dds/include/ndds/hpp/dds/domain/DomainParticipant.hpp:26,

                 from /workspace/basicebtp/src/cpp11/basictypes.hpp:24,

                 from /workspace/basicebtp/src/cpp11/basictypes.cxx:17:

/usr/dds/include/ndds/hpp/rti/core/policy/CorePolicyAdapter.hpp: In static member function 'static void rti::core::policy::LoggingAdapter::initialize(rti::core::SimpleTypeAdapter<DDS_LoggingQosPolicy>::native_type&)':

/usr/dds/include/ndds/ndds_config_c.h:314:1: error: could not convert '{NDDS_CONFIG_LOG_VERBOSITY_ERROR, NDDS_CONFIG_LOG_CATEGORY_ALL, NDDS_CONFIG_LOG_PRINT_FORMAT_DEFAULT, 0, 0, -1, -1}' from '<brace-enclosed initializer list>' to 'const native_type' {aka 'const DDS_LoggingQosPolicy'}

 }

 ^

/usr/dds/include/ndds/hpp/rti/core/policy/CorePolicyAdapter.hpp:77:44: note: in definition of macro 'RTI_POLICY_DEFINE_SIMPLE_ADAPTER'

         static const native_type DEFAULT = DEFAULT_CONSTANT;                   \

                                            ^~~~~~~~~~~~~~~~

/usr/dds/include/ndds/hpp/rti/core/policy/CorePolicyAdapter.hpp:165:43: note: in expansion of macro 'DDS_LOGGING_QOS_POLICY_DEFAULT'

 RTI_POLICY_DEFINE_SIMPLE_ADAPTER(Logging, DDS_LOGGING_QOS_POLICY_DEFAULT)

                                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

In file included from /usr/dds/include/ndds/ndds_c.h:111,

                 from /usr/dds/include/ndds/hpp/rti/core/detail/NativeSequence.hpp:27,

                 from /usr/dds/include/ndds/hpp/rti/core/InstanceHandle.hpp:22,

                 from /usr/dds/include/ndds/hpp/dds/core/detail/InstanceHandle.hpp:27,

                 from /usr/dds/include/ndds/hpp/dds/core/InstanceHandle.hpp:23,

                 from /usr/dds/include/ndds/hpp/dds/core/status/TStatus.hpp:27,

                 from /usr/dds/include/ndds/hpp/dds/core/status/detail/Status.hpp:26,

                 from /usr/dds/include/ndds/hpp/dds/core/status/Status.hpp:26,

                 from /usr/dds/include/ndds/hpp/dds/core/TEntity.hpp:29,

                 from /usr/dds/include/ndds/hpp/dds/domain/TDomainParticipant.hpp:31,

                 from /usr/dds/include/ndds/hpp/dds/domain/detail/DomainParticipant.hpp:26,

                 from /usr/dds/include/ndds/hpp/dds/domain/DomainParticipant.hpp:26,

                 from /workspace/basicebtp/src/cpp11/basictypes.hpp:24,

                 from /workspace/basicebtp/src/cpp11/basictypes.cxx:17:

/usr/dds/include/ndds/hpp/rti/core/ProxyTypeSupport.hpp: In constructor 'rti::core::DynamicDataProxyTypeSupportImpl::DynamicDataProxyTypeSupportImpl(const DDS_TypeCode*, const DDS_DynamicDataTypeProperty_t&)':

/usr/dds/include/ndds/dds_c/dds_c_dynamicdata.h:2206:60: error: could not convert '{0, -1, 1024, 1, DDS_DYNAMIC_DATA_STRING_ENCODING_UTF_8_KIND, 0}' from '<brace-enclosed initializer list>' to 'DDS_DynamicDataProperty_t'

     DDS_DynamicDataTypeSerializationProperty_t_INITIALIZER }

                                                            ^

/usr/dds/include/ndds/hpp/rti/core/ProxyTypeSupport.hpp:161:13: note: in expansion of macro 'DDS_DynamicDataTypeProperty_t_INITIALIZER'

             DDS_DynamicDataTypeProperty_t_INITIALIZER;

             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

/usr/dds/include/ndds/dds_c/dds_c_dynamicdata.h:2206:60: error: could not convert '{0, 4294967295, 4294967295, 0, 0}' from '<brace-enclosed initializer list>' to 'DDS_DynamicDataTypeSerializationProperty_t'

     DDS_DynamicDataTypeSerializationProperty_t_INITIALIZER }

                                                            ^

/usr/dds/include/ndds/hpp/rti/core/ProxyTypeSupport.hpp:161:13: note: in expansion of macro 'DDS_DynamicDataTypeProperty_t_INITIALIZER'

             DDS_DynamicDataTypeProperty_t_INITIALIZER;

             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

In file included from /usr/dds/include/ndds/ndds_c.h:111,

                 from /usr/dds/include/ndds/hpp/rti/core/detail/NativeSequence.hpp:27,

                 from /usr/dds/include/ndds/hpp/rti/core/InstanceHandle.hpp:22,

                 from /usr/dds/include/ndds/hpp/dds/core/detail/InstanceHandle.hpp:27,

                 from /usr/dds/include/ndds/hpp/dds/core/InstanceHandle.hpp:23,

                 from /usr/dds/include/ndds/hpp/dds/core/status/TStatus.hpp:27,

                 from /usr/dds/include/ndds/hpp/dds/core/status/detail/Status.hpp:26,

                 from /usr/dds/include/ndds/hpp/dds/core/status/Status.hpp:26,

                 from /usr/dds/include/ndds/hpp/dds/core/TEntity.hpp:29,

                 from /usr/dds/include/ndds/hpp/dds/domain/TDomainParticipant.hpp:31,

                 from /usr/dds/include/ndds/hpp/dds/domain/detail/DomainParticipant.hpp:26,

                 from /usr/dds/include/ndds/hpp/dds/domain/DomainParticipant.hpp:26,

                 from /workspace/basicebtp/src/cpp11/basictypes.hpp:24,

                 from /workspace/basicebtp/src/cpp11/basictypes.cxx:17:

/usr/dds/include/ndds/hpp/rti/core/xtypes/DynamicDataProperty.hpp: In static member function 'static void rti::core::DynamicDataPropertyNativeAdapter::initialize(rti::core::PODNativeAdapter<DDS_DynamicDataProperty_t>::native_type&)':

/usr/dds/include/ndds/dds_c/dds_c_dynamicdata.h:107:3: error: could not convert '{0, -1, 1024, 1, DDS_DYNAMIC_DATA_STRING_ENCODING_UTF_8_KIND, 0}' from '<brace-enclosed initializer list>' to 'DDS_DynamicDataProperty_t'

   }

   ^

/usr/dds/include/ndds/hpp/rti/core/xtypes/DynamicDataProperty.hpp:40:13: note: in expansion of macro 'DDS_DynamicDataProperty_t_INITIALIZER'

             DDS_DynamicDataProperty_t_INITIALIZER;

             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

/usr/dds/include/ndds/hpp/rti/core/xtypes/DynamicDataProperty.hpp: In static member function 'static void rti::core::DynamicDataTypeSerializationPropertyNativeAdapter::initialize(rti::core::PODNativeAdapter<DDS_DynamicDataTypeSerializationProperty_t>::native_type&)':

/usr/dds/include/ndds/dds_c/dds_c_dynamicdata.h:153:3: error: could not convert '{0, 4294967295, 4294967295, 0, 0}' from '<brace-enclosed initializer list>' to 'DDS_DynamicDataTypeSerializationProperty_t'

   }

   ^

/usr/dds/include/ndds/hpp/rti/core/xtypes/DynamicDataProperty.hpp:53:13: note: in expansion of macro 'DDS_DynamicDataTypeSerializationProperty_t_INITIALIZER'

             DDS_DynamicDataTypeSerializationProperty_t_INITIALIZER;

             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

In file included from /usr/dds/include/ndds/hpp/dds/core/detail/Vector.hpp:26,

                 from /usr/dds/include/ndds/hpp/dds/core/vector.hpp:30,

                 from /usr/dds/include/ndds/hpp/rti/topic/cdr/Serialization.hpp:34,

                 from /workspace/basicebtp/src/cpp11/basictypes.cxx:15:

/usr/dds/include/ndds/hpp/rti/core/Vector.hpp: In instantiation of 'void rti::core::NativeSequenceWrapper<T>::set_default() [with T = unsigned int]':

/usr/dds/include/ndds/hpp/rti/core/Vector.hpp:58:9:   required from 'rti::core::NativeSequenceWrapper<T>::NativeSequenceWrapper() [with T = unsigned int]'

/usr/dds/include/ndds/hpp/rti/core/Vector.hpp:148:5:   required from 'rti::core::SequenceBase<T>::SequenceBase(rti::core::SequenceBase<T>::size_type) [with T = unsigned int; rti::core::SequenceBase<T>::size_type = long unsigned int]'

/usr/dds/include/ndds/hpp/rti/core/Vector.hpp:264:71:   required from 'rti::core::vector<T>::vector(rti::core::vector<T>::size_type, const T&) [with T = unsigned int; rti::core::vector<T>::size_type = long unsigned int]'

/usr/dds/include/ndds/hpp/rti/core/xtypes/CollectionTypesImpl.hpp:174:57:   required from here

/usr/dds/include/ndds/hpp/rti/core/Vector.hpp:64:32: error: could not convert '{1, 0, 0, 0, 0, 29508, 0, 0, {1, 0, 1}, {1, 1}, 2147483647}' from '<brace-enclosed initializer list>' to 'const NativeSeq' {aka 'const DDS_OctetSeq'}

         static const NativeSeq DEFAULT = DDS_SEQUENCE_INITIALIZER;

                                ^~~~~~~

/usr/dds/include/ndds/hpp/rti/core/Vector.hpp: In instantiation of 'void rti::core::NativeSequenceWrapper<T>::set_default() [with T = rti::core::Locator]':

/usr/dds/include/ndds/hpp/rti/core/Vector.hpp:58:9:   required from 'rti::core::NativeSequenceWrapper<T>::NativeSequenceWrapper() [with T = rti::core::Locator]'

/usr/dds/include/ndds/hpp/rti/core/Vector.hpp:148:5:   required from 'rti::core::SequenceBase<T>::SequenceBase(rti::core::SequenceBase<T>::size_type) [with T = rti::core::Locator; rti::core::SequenceBase<T>::size_type = long unsigned int]'

/usr/dds/include/ndds/hpp/rti/core/Vector.hpp:534:73:   required from 'rti::core::vector<T>::vector(const rti::core::vector<T>&, rti::core::vector<T>::size_type) [with T = rti::core::Locator; rti::core::vector<T>::size_type = long unsigned int]'

/usr/dds/include/ndds/hpp/rti/core/Vector.hpp:364:24:   required from 'void rti::core::vector<T>::resize(rti::core::vector<T>::size_type, const T&) [with T = rti::core::Locator; rti::core::vector<T>::size_type = long unsigned int]'

/usr/dds/include/ndds/hpp/rti/core/detail/NativeConversion.hpp:132:5:   required from 'void rti::core::native_conversions::to_native(const TSeq&, NativeSeq&, const T&) [with T = rti::core::Locator; TSeq = std::vector<rti::core::Locator>; NativeSeq = DDS_LocatorSeq]'

/usr/dds/include/ndds/hpp/rti/core/LocatorFilter.hpp:133:38:   required from here

/usr/dds/include/ndds/hpp/rti/core/Vector.hpp:64:32: error: could not convert '{1, 0, 0, 0, 0, 29508, 0, 0, {1, 0, 1}, {1, 1}, 2147483647}' from '<brace-enclosed initializer list>' to 'const NativeSeq' {aka 'const DDS_OctetSeq'}

In file included from /usr/dds/include/ndds/hpp/rti/core/policy/CorePolicy.hpp:48,

                 from /usr/dds/include/ndds/hpp/dds/core/policy/detail/CorePolicy.hpp:26,

                 from /usr/dds/include/ndds/hpp/dds/core/policy/CorePolicy.hpp:27,

                 from /usr/dds/include/ndds/hpp/dds/core/ddscore.hpp:93,

                 from /usr/dds/include/ndds/hpp/dds/dds.hpp:26,

                 from /workspace/basicebtp/src/cpp11/basictypesPlugin.cxx:12:

/usr/dds/include/ndds/hpp/rti/core/policy/CorePolicyAdapter.hpp: In static member function 'static void rti::core::policy::LoggingAdapter::initialize(rti::core::SimpleTypeAdapter<DDS_LoggingQosPolicy>::native_type&)':

/usr/dds/include/ndds/ndds_config_c.h:314:1: error: could not convert '{NDDS_CONFIG_LOG_VERBOSITY_ERROR, NDDS_CONFIG_LOG_CATEGORY_ALL, NDDS_CONFIG_LOG_PRINT_FORMAT_DEFAULT, 0, 0, -1, -1}' from '<brace-enclosed initializer list>' to 'const native_type' {aka 'const DDS_LoggingQosPolicy'}

 }

 ^

/usr/dds/include/ndds/hpp/rti/core/policy/CorePolicyAdapter.hpp:77:44: note: in definition of macro 'RTI_POLICY_DEFINE_SIMPLE_ADAPTER'

         static const native_type DEFAULT = DEFAULT_CONSTANT;                   \

                                            ^~~~~~~~~~~~~~~~

/usr/dds/include/ndds/hpp/rti/core/policy/CorePolicyAdapter.hpp:165:43: note: in expansion of macro 'DDS_LOGGING_QOS_POLICY_DEFAULT'

 RTI_POLICY_DEFINE_SIMPLE_ADAPTER(Logging, DDS_LOGGING_QOS_POLICY_DEFAULT)

                                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

In file included from /usr/dds/include/ndds/ndds_c.h:111,

                 from /usr/dds/include/ndds/hpp/rti/core/detail/NativeSequence.hpp:27,

                 from /usr/dds/include/ndds/hpp/rti/core/InstanceHandle.hpp:22,

                 from /usr/dds/include/ndds/hpp/dds/core/detail/InstanceHandle.hpp:27,

                 from /usr/dds/include/ndds/hpp/dds/core/InstanceHandle.hpp:23,

                 from /usr/dds/include/ndds/hpp/dds/core/status/TStatus.hpp:27,

                 from /usr/dds/include/ndds/hpp/dds/core/status/detail/Status.hpp:26,

                 from /usr/dds/include/ndds/hpp/dds/core/status/Status.hpp:26,

                 from /usr/dds/include/ndds/hpp/dds/core/ddscore.hpp:42,

                 from /usr/dds/include/ndds/hpp/dds/dds.hpp:26,

                 from /workspace/basicebtp/src/cpp11/basictypesPlugin.cxx:12:

/usr/dds/include/ndds/hpp/rti/core/xtypes/DynamicDataProperty.hpp: In static member function 'static void rti::core::DynamicDataPropertyNativeAdapter::initialize(rti::core::PODNativeAdapter<DDS_DynamicDataProperty_t>::native_type&)':

/usr/dds/include/ndds/dds_c/dds_c_dynamicdata.h:107:3: error: could not convert '{0, -1, 1024, 1, DDS_DYNAMIC_DATA_STRING_ENCODING_UTF_8_KIND, 0}' from '<brace-enclosed initializer list>' to 'DDS_DynamicDataProperty_t'

   }

   ^

/usr/dds/include/ndds/hpp/rti/core/xtypes/DynamicDataProperty.hpp:40:13: note: in expansion of macro 'DDS_DynamicDataProperty_t_INITIALIZER'

             DDS_DynamicDataProperty_t_INITIALIZER;

             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

/usr/dds/include/ndds/hpp/rti/core/xtypes/DynamicDataProperty.hpp: In static member function 'static void rti::core::DynamicDataTypeSerializationPropertyNativeAdapter::initialize(rti::core::PODNativeAdapter<DDS_DynamicDataTypeSerializationProperty_t>::native_type&)':

/usr/dds/include/ndds/dds_c/dds_c_dynamicdata.h:153:3: error: could not convert '{0, 4294967295, 4294967295, 0, 0}' from '<brace-enclosed initializer list>' to 'DDS_DynamicDataTypeSerializationProperty_t'

   }

   ^

/usr/dds/include/ndds/hpp/rti/core/xtypes/DynamicDataProperty.hpp:53:13: note: in expansion of macro 'DDS_DynamicDataTypeSerializationProperty_t_INITIALIZER'

             DDS_DynamicDataTypeSerializationProperty_t_INITIALIZER;

             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

In file included from /usr/dds/include/ndds/ndds_c.h:111,

                 from /usr/dds/include/ndds/hpp/rti/core/detail/NativeSequence.hpp:27,

                 from /usr/dds/include/ndds/hpp/rti/core/InstanceHandle.hpp:22,

                 from /usr/dds/include/ndds/hpp/dds/core/detail/InstanceHandle.hpp:27,

                 from /usr/dds/include/ndds/hpp/dds/core/InstanceHandle.hpp:23,

                 from /usr/dds/include/ndds/hpp/dds/core/status/TStatus.hpp:27,

                 from /usr/dds/include/ndds/hpp/dds/core/status/detail/Status.hpp:26,

                 from /usr/dds/include/ndds/hpp/dds/core/status/Status.hpp:26,

                 from /usr/dds/include/ndds/hpp/dds/core/ddscore.hpp:42,

                 from /usr/dds/include/ndds/hpp/dds/dds.hpp:26,

                 from /workspace/basicebtp/src/cpp11/basictypesPlugin.cxx:12:

/usr/dds/include/ndds/hpp/rti/core/ProxyTypeSupport.hpp: In constructor 'rti::core::DynamicDataProxyTypeSupportImpl::DynamicDataProxyTypeSupportImpl(const DDS_TypeCode*, const DDS_DynamicDataTypeProperty_t&)':

/usr/dds/include/ndds/dds_c/dds_c_dynamicdata.h:2206:60: error: could not convert '{0, -1, 1024, 1, DDS_DYNAMIC_DATA_STRING_ENCODING_UTF_8_KIND, 0}' from '<brace-enclosed initializer list>' to 'DDS_DynamicDataProperty_t'

     DDS_DynamicDataTypeSerializationProperty_t_INITIALIZER }

                                                            ^

/usr/dds/include/ndds/hpp/rti/core/ProxyTypeSupport.hpp:161:13: note: in expansion of macro 'DDS_DynamicDataTypeProperty_t_INITIALIZER'

             DDS_DynamicDataTypeProperty_t_INITIALIZER;

             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

/usr/dds/include/ndds/dds_c/dds_c_dynamicdata.h:2206:60: error: could not convert '{0, 4294967295, 4294967295, 0, 0}' from '<brace-enclosed initializer list>' to 'DDS_DynamicDataTypeSerializationProperty_t'

     DDS_DynamicDataTypeSerializationProperty_t_INITIALIZER }

                                                            ^

/usr/dds/include/ndds/hpp/rti/core/ProxyTypeSupport.hpp:161:13: note: in expansion of macro 'DDS_DynamicDataTypeProperty_t_INITIALIZER'

             DDS_DynamicDataTypeProperty_t_INITIALIZER;

             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

In file included from /usr/dds/include/ndds/hpp/rti/core/InstanceHandle.hpp:21,

                 from /usr/dds/include/ndds/hpp/dds/core/detail/InstanceHandle.hpp:27,

                 from /usr/dds/include/ndds/hpp/dds/core/InstanceHandle.hpp:23,

                 from /usr/dds/include/ndds/hpp/dds/core/status/TStatus.hpp:27,

                 from /usr/dds/include/ndds/hpp/dds/core/status/detail/Status.hpp:26,

                 from /usr/dds/include/ndds/hpp/dds/core/status/Status.hpp:26,

                 from /usr/dds/include/ndds/hpp/dds/core/ddscore.hpp:42,

                 from /usr/dds/include/ndds/hpp/dds/dds.hpp:26,

                 from /workspace/basicebtp/src/cpp11/basictypesPlugin.cxx:12:

/usr/dds/include/ndds/hpp/rti/core/NativeValueType.hpp: In instantiation of 'rti::core::NativeValueType<T, NATIVE_T, ADAPTER>::NativeValueType(rti::core::NativeValueType<T, NATIVE_T, ADAPTER>&&) [with T = rti::core::xtypes::DynamicDataImpl; NATIVE_T = DDS_DynamicData; ADAPTER = rti::core::DynamicDataNativeAdapter]':

/usr/dds/include/ndds/hpp/rti/core/xtypes/DynamicDataImpl.hpp:290:32:   required from here

/usr/dds/include/ndds/hpp/rti/core/NativeValueType.hpp:156:5: error: no matching function for call to 'DDS_DynamicData::DDS_DynamicData()'

     {

     ^

In file included from /usr/dds/include/ndds/ndds_c.h:111,

                 from /usr/dds/include/ndds/hpp/rti/core/detail/NativeSequence.hpp:27,

                 from /usr/dds/include/ndds/hpp/rti/core/InstanceHandle.hpp:22,

                 from /usr/dds/include/ndds/hpp/dds/core/detail/InstanceHandle.hpp:27,

                 from /usr/dds/include/ndds/hpp/dds/core/InstanceHandle.hpp:23,

                 from /usr/dds/include/ndds/hpp/dds/core/status/TStatus.hpp:27,

                 from /usr/dds/include/ndds/hpp/dds/core/status/detail/Status.hpp:26,

                 from /usr/dds/include/ndds/hpp/dds/core/status/Status.hpp:26,

                 from /usr/dds/include/ndds/hpp/dds/core/ddscore.hpp:42,

                 from /usr/dds/include/ndds/hpp/dds/dds.hpp:26,

                 from /workspace/basicebtp/src/cpp11/basictypesPlugin.cxx:12:

/usr/dds/include/ndds/dds_c/dds_c_dynamicdata.h:377:5: note: candidate: 'DDS_DynamicData::DDS_DynamicData(const DDS_TypeCode*, const DDS_DynamicDataProperty_t&)'

     DDS_DynamicData(

     ^~~~~~~~~~~~~~~

/usr/dds/include/ndds/dds_c/dds_c_dynamicdata.h:377:5: note:   candidate expects 2 arguments, 0 provided

/usr/dds/include/ndds/dds_c/dds_c_dynamicdata.h:363:5: note: candidate: 'DDS_DynamicData::DDS_DynamicData(const DDS_DynamicData&)'

     DDS_DynamicData(const DDS_DynamicData &);

     ^~~~~~~~~~~~~~~

/usr/dds/include/ndds/dds_c/dds_c_dynamicdata.h:363:5: note:   candidate expects 1 argument, 0 provided

In file included from /usr/dds/include/ndds/hpp/rti/core/InstanceHandle.hpp:21,

                 from /usr/dds/include/ndds/hpp/dds/core/detail/InstanceHandle.hpp:27,

                 from /usr/dds/include/ndds/hpp/dds/core/InstanceHandle.hpp:23,

                 from /usr/dds/include/ndds/hpp/dds/core/status/TStatus.hpp:27,

                 from /usr/dds/include/ndds/hpp/dds/core/status/detail/Status.hpp:26,

                 from /usr/dds/include/ndds/hpp/dds/core/status/Status.hpp:26,

                 from /usr/dds/include/ndds/hpp/dds/core/ddscore.hpp:42,

                 from /usr/dds/include/ndds/hpp/dds/dds.hpp:26,

                 from /workspace/basicebtp/src/cpp11/basictypesPlugin.cxx:12:

/usr/dds/include/ndds/hpp/rti/core/NativeValueType.hpp: In instantiation of 'void rti::core::swap(rti::core::NativeValueType<T, NATIVE_T, ADAPTER>&, rti::core::NativeValueType<T, NATIVE_T, ADAPTER>&) [with T = rti::core::xtypes::DynamicDataImpl; NATIVE_T = DDS_DynamicData; ADAPTER = rti::core::DynamicDataNativeAdapter]':

/usr/dds/include/ndds/hpp/rti/core/xtypes/DynamicDataImpl.hpp:1102:26:   required from here

/usr/dds/include/ndds/hpp/rti/core/NativeValueType.hpp:221:17: error: no matching function for call to 'DDS_DynamicData::DDS_DynamicData()'

     native_type tmp;

                 ^~~

In file included from /usr/dds/include/ndds/ndds_c.h:111,

                 from /usr/dds/include/ndds/hpp/rti/core/detail/NativeSequence.hpp:27,

                 from /usr/dds/include/ndds/hpp/rti/core/InstanceHandle.hpp:22,

                 from /usr/dds/include/ndds/hpp/dds/core/detail/InstanceHandle.hpp:27,

                 from /usr/dds/include/ndds/hpp/dds/core/InstanceHandle.hpp:23,

                 from /usr/dds/include/ndds/hpp/dds/core/status/TStatus.hpp:27,

                 from /usr/dds/include/ndds/hpp/dds/core/status/detail/Status.hpp:26,

                 from /usr/dds/include/ndds/hpp/dds/core/status/Status.hpp:26,

                 from /usr/dds/include/ndds/hpp/dds/core/ddscore.hpp:42,

                 from /usr/dds/include/ndds/hpp/dds/dds.hpp:26,

                 from /workspace/basicebtp/src/cpp11/basictypesPlugin.cxx:12:

/usr/dds/include/ndds/dds_c/dds_c_dynamicdata.h:377:5: note: candidate: 'DDS_DynamicData::DDS_DynamicData(const DDS_TypeCode*, const DDS_DynamicDataProperty_t&)'

     DDS_DynamicData(

     ^~~~~~~~~~~~~~~

/usr/dds/include/ndds/dds_c/dds_c_dynamicdata.h:377:5: note:   candidate expects 2 arguments, 0 provided

/usr/dds/include/ndds/dds_c/dds_c_dynamicdata.h:363:5: note: candidate: 'DDS_DynamicData::DDS_DynamicData(const DDS_DynamicData&)'

     DDS_DynamicData(const DDS_DynamicData &);

     ^~~~~~~~~~~~~~~

/usr/dds/include/ndds/dds_c/dds_c_dynamicdata.h:363:5: note:   candidate expects 1 argument, 0 provided

In file included from /usr/dds/include/ndds/hpp/dds/core/detail/Vector.hpp:26,

                 from /usr/dds/include/ndds/hpp/dds/core/vector.hpp:30,

                 from /usr/dds/include/ndds/hpp/rti/core/AllocationSettings.hpp:23,

                 from /usr/dds/include/ndds/hpp/rti/core/policy/CorePolicy.hpp:39,

                 from /usr/dds/include/ndds/hpp/dds/core/policy/detail/CorePolicy.hpp:26,

                 from /usr/dds/include/ndds/hpp/dds/core/policy/CorePolicy.hpp:27,

                 from /usr/dds/include/ndds/hpp/dds/core/ddscore.hpp:93,

                 from /usr/dds/include/ndds/hpp/dds/dds.hpp:26,

                 from /workspace/basicebtp/src/cpp11/basictypesPlugin.cxx:12:

/usr/dds/include/ndds/hpp/rti/core/Vector.hpp: In instantiation of 'void rti::core::NativeSequenceWrapper<T>::set_default() [with T = unsigned int]':

/usr/dds/include/ndds/hpp/rti/core/Vector.hpp:58:9:   required from 'rti::core::NativeSequenceWrapper<T>::NativeSequenceWrapper() [with T = unsigned int]'

/usr/dds/include/ndds/hpp/rti/core/Vector.hpp:148:5:   required from 'rti::core::SequenceBase<T>::SequenceBase(rti::core::SequenceBase<T>::size_type) [with T = unsigned int; rti::core::SequenceBase<T>::size_type = long unsigned int]'

/usr/dds/include/ndds/hpp/rti/core/Vector.hpp:264:71:   required from 'rti::core::vector<T>::vector(rti::core::vector<T>::size_type, const T&) [with T = unsigned int; rti::core::vector<T>::size_type = long unsigned int]'

/usr/dds/include/ndds/hpp/rti/core/xtypes/CollectionTypesImpl.hpp:174:57:   required from here

/usr/dds/include/ndds/hpp/rti/core/Vector.hpp:64:32: error: could not convert '{1, 0, 0, 0, 0, 29508, 0, 0, {1, 0, 1}, {1, 1}, 2147483647}' from '<brace-enclosed initializer list>' to 'const NativeSeq' {aka 'const DDS_OctetSeq'}

         static const NativeSeq DEFAULT = DDS_SEQUENCE_INITIALIZER;

                                ^~~~~~~

/usr/dds/include/ndds/hpp/rti/core/Vector.hpp: In instantiation of 'void rti::core::NativeSequenceWrapper<T>::set_default() [with T = rti::core::Locator]':

/usr/dds/include/ndds/hpp/rti/core/Vector.hpp:58:9:   required from 'rti::core::NativeSequenceWrapper<T>::NativeSequenceWrapper() [with T = rti::core::Locator]'

/usr/dds/include/ndds/hpp/rti/core/Vector.hpp:143:5:   required from 'rti::core::SequenceBase<T>::SequenceBase() [with T = rti::core::Locator]'

/usr/dds/include/ndds/hpp/rti/core/Vector.hpp:248:5:   required from 'rti::core::vector<T>::vector() [with T = rti::core::Locator]'

/usr/dds/include/ndds/hpp/rti/topic/BuiltinTopicImpl.hpp:68:36:   required from here

/usr/dds/include/ndds/hpp/rti/core/Vector.hpp:64:32: error: could not convert '{1, 0, 0, 0, 0, 29508, 0, 0, {1, 0, 1}, {1, 1}, 2147483647}' from '<brace-enclosed initializer list>' to 'const NativeSeq' {aka 'const DDS_OctetSeq'}

/usr/dds/include/ndds/hpp/rti/core/Vector.hpp: In instantiation of 'void rti::core::NativeSequenceWrapper<T>::set_default() [with T = rti::core::TransportInfo]':

/usr/dds/include/ndds/hpp/rti/core/Vector.hpp:58:9:   required from 'rti::core::NativeSequenceWrapper<T>::NativeSequenceWrapper() [with T = rti::core::TransportInfo]'

/usr/dds/include/ndds/hpp/rti/core/Vector.hpp:143:5:   required from 'rti::core::SequenceBase<T>::SequenceBase() [with T = rti::core::TransportInfo]'

/usr/dds/include/ndds/hpp/rti/core/Vector.hpp:248:5:   required from 'rti::core::vector<T>::vector() [with T = rti::core::TransportInfo]'

/usr/dds/include/ndds/hpp/rti/topic/BuiltinTopicImpl.hpp:68:36:   required from here

/usr/dds/include/ndds/hpp/rti/core/Vector.hpp:64:32: error: could not convert '{1, 0, 0, 0, 0, 29508, 0, 0, {1, 0, 1}, {1, 1}, 2147483647}' from '<brace-enclosed initializer list>' to 'const NativeSeq' {aka 'const DDS_OctetSeq'}

/usr/dds/include/ndds/hpp/rti/core/Vector.hpp: In instantiation of 'void rti::core::NativeSequenceWrapper<T>::set_default() [with T = unsigned char]':

/usr/dds/include/ndds/hpp/rti/core/Vector.hpp:58:9:   required from 'rti::core::NativeSequenceWrapper<T>::NativeSequenceWrapper() [with T = unsigned char]'

/usr/dds/include/ndds/hpp/rti/core/Vector.hpp:143:5:   required from 'rti::core::SequenceBase<T>::SequenceBase() [with T = unsigned char]'

/usr/dds/include/ndds/hpp/rti/core/Vector.hpp:248:5:   required from 'rti::core::vector<T>::vector() [with T = unsigned char]'

/usr/dds/include/ndds/hpp/rti/topic/BuiltinTopicImpl.hpp:1385:63:   required from here

/usr/dds/include/ndds/hpp/rti/core/Vector.hpp:64:32: error: could not convert '{1, 0, 0, 0, 0, 29508, 0, 0, {1, 0, 1}, {1, 1}, 2147483647}' from '<brace-enclosed initializer list>' to 'const NativeSeq' {aka 'const DDS_OctetSeq'}

 

   compilation of basictypesPlugin.cxx failed

   compilation of basictypes.cxx failed

Offline
Last seen: 1 month 5 days ago
Joined: 04/02/2013
Posts: 196

Are you mixing the traditional C++ and modern C++ APIs? Make sure you don't include ndds_cpp.h anywhere where you include modern C++ headers.

 

More info: https://community.rti.com/kb/how-do-i-use-traditional-c-and-modern-c-apis-same-application

 

 

Offline
Last seen: 2 years 10 months ago
Joined: 12/13/2021
Posts: 4

Hi "alexc".

As I explained in my post I'm only compiling the generated code as is (the .cxx files) without any custom code. I need to compile these bindings into a .so dynamic lib.

As such I do not mix the two kinds of C++s. It's only what's generated.

All the headers failing are from the generated code #includes.

Offline
Last seen: 2 years 10 months ago
Joined: 12/13/2021
Posts: 4

What I should've added is that I've been using the gprbuild to build the binding, and I did change the "with" from "dds_cpp.gpr" to "dds_cpp2.gpr" in the .gpr file for the bindings.

I'm not much familiar with the gprbuild but that's what our company's project toolchain is using so I have to work with it.

Offline
Last seen: 2 years 10 months ago
Joined: 12/13/2021
Posts: 4

Hello again,

With the help of a colleague who's familiar gprbuilder and gpr file structures I got the build sorted.

The fix was related to the need for USE_RTI_CPP having to be disabled (undefined) for the Modern C++ API.

TBH I find the need to undefine the above macro counterintuitive.
Would be more intuitive to rather have e.g. a USE_RTI_CPP2 that would override (undefine) inside the RTI code the former macro.
Also a more explicit point in the Modern C++ API documentation about not having that macro definined would help many avoid the same issue.

Something for the RTI devs to consider.   

I find it interesting that nobody responded here to raise/mention this macro presence as the possible cause for the API mixup inside the RTI code.

Cheers

Gabe L.

 

Howard's picture
Offline
Last seen: 7 hours 21 min ago
Joined: 11/29/2012
Posts: 605

Hi Gabe,

Uhm, USE_RTI_CPP and USE_RTI_CPP2 are not defined by RTI.  I don't see it defined or used in any of the header files distributed by RTI.

I assume that it's part of your company's build infrastructure.  So, you should approach whomever maintains your build infrastructure for the change that you suggested.

Best regards,

--Howard