MAP_TYPE in dds/core/xtypes/TypeKind.hpp does not compile

3 posts / 0 new
Last post
Offline
Last seen: 6 years 1 month ago
Joined: 12/20/2017
Posts: 4
MAP_TYPE in dds/core/xtypes/TypeKind.hpp does not compile

Hi,

We have a problem compiling a RTI DDS Connext 5.3.0 application because of the following error:

  /home/user/rti_connext_dds/rti_connext_dds-5.3.0/include/ndds/hpp/dds/core/xtypes/TypeKind.hpp: At global scope:
  /home/user/rti_connext_dds/rti_connext_dds-5.3.0/include/ndds/hpp/dds/core/xtypes/TypeKind.hpp:148:11: error: expected identifier before numeric constant
          MAP_TYPE         = CONSTRUCTED_TYPE | COLLECTION_TYPE | 0x0007,
          ^

If I remove the line 148 (containing MAP_TYPE) from TypeKind.hpp, the software compiles just fine. The only think I can think of is that my message definitions were wrong - e.g. some weird unallowed nested types, but they should be fine. I don't think I use any MAP_TYPEs in the first place. I only have sequences and nested objects such as:

struct MyTopLevelObject
{
  MyHeader header;
  sequence<MyObject, 10> objects;
};
struct MyObject
{
  sequence<string<64>, 200> strings;
};

 

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

Hi, 

I haven't seen that error before. I wonder if your application or your compiler defines MAP_TYPE in the global namespace as something else.

Alex

 

Offline
Last seen: 6 years 8 months ago
Joined: 02/26/2018
Posts: 1

Hi,

I have encountered the same problem, it comes from a maccro defined in the header located at /usr/include/bits/mman.h, as it is a system library, editing it doesn't seems like a good option to me, and i haven't find any good solution yet. If anyone has a solution for this without undefining it or removing it from the DDS file I'm interested !