Git Product home page Git Product logo

Comments (7)

k0ekk0ek avatar k0ekk0ek commented on June 5, 2024

Hey @dkroenke! Can you give my #108 a try?

from cyclonedds-cxx.

dkroenke avatar dkroenke commented on June 5, 2024

@k0ekk0ek
I gave it a try and the compilation error changed a bit:

In file included from iceoryx/build/dependencies/install/include/ddscxx/org/eclipse/cyclonedds/topic/TopicTraits.hpp:24,
                 from iceoryx/build/iceoryx_dds_messages/Mempool.hpp:48,
                 from iceoryx/iceoryx_dds/include/iceoryx_dds/dds/cyclone_data_reader.hpp:23,
                 from iceoryx/iceoryx_dds/source/iceoryx_dds/dds/cyclone_data_reader.cpp:18:
iceoryx/build/dependencies/install/include/ddscxx/org/eclipse/cyclonedds/topic/datatopic.hpp: In constructor ‘ddscxx_sertype<T>::ddscxx_sertype()’:
iceoryx/build/dependencies/install/include/ddscxx/org/eclipse/cyclonedds/topic/datatopic.hpp:536:38: error: ‘TopicTraits’ is not a member of ‘org::eclipse::cyclonedds::topic’
  536 |     org::eclipse::cyclonedds::topic::TopicTraits<T>::getTypeName(),
      |                                      ^~~~~~~~~~~
iceoryx/build/dependencies/install/include/ddscxx/org/eclipse/cyclonedds/topic/datatopic.hpp:536:51: error: expected primary-expression before ‘>’ token
  536 |     org::eclipse::cyclonedds::topic::TopicTraits<T>::getTypeName(),
      |                                                   ^
iceoryx/build/dependencies/install/include/ddscxx/org/eclipse/cyclonedds/topic/datatopic.hpp:536:54: error: ‘::getTypeName’ has not been declared; did you mean ‘typename’?
  536 |     org::eclipse::cyclonedds::topic::TopicTraits<T>::getTypeName(),
      |                                                      ^~~~~~~~~~~
      |                                                      typename
iceoryx/build/dependencies/install/include/ddscxx/org/eclipse/cyclonedds/topic/datatopic.hpp:539:38: error: ‘TopicTraits’ is not a member of ‘org::eclipse::cyclonedds::topic’
  539 |     org::eclipse::cyclonedds::topic::TopicTraits<T>::isKeyless());
      |                                      ^~~~~~~~~~~
iceoryx/build/dependencies/install/include/ddscxx/org/eclipse/cyclonedds/topic/datatopic.hpp:539:51: error: expected primary-expression before ‘>’ token
  539 |     org::eclipse::cyclonedds::topic::TopicTraits<T>::isKeyless());
      |                                                   ^
iceoryx/build/dependencies/install/include/ddscxx/org/eclipse/cyclonedds/topic/datatopic.hpp:539:54: error: ‘::isKeyless’ has not been declared
  539 |     org::eclipse::cyclonedds::topic::TopicTraits<T>::isKeyless());
      |                                                      ^~~~~~~~~
In file included from iceoryx/iceoryx_dds/include/iceoryx_dds/dds/cyclone_data_reader.hpp:23,
                 from iceoryx/iceoryx_dds/source/iceoryx_dds/dds/cyclone_data_reader.cpp:18:
iceoryx/build/iceoryx_dds_messages/Mempool.hpp: At global scope:
iceoryx/build/iceoryx_dds_messages/Mempool.hpp:97:8: error: ‘topic_type_name’ is not a class template
   97 | struct topic_type_name<::Mempool::Chunk>
      |        ^~~~~~~~~~~~~~~
iceoryx/build/iceoryx_dds_messages/Mempool.hpp:98:1: error: explicit specialization of non-template ‘dds::topic::topic_type_name’
   98 | {
      | ^
iceoryx/build/iceoryx_dds_messages/Mempool.hpp:110:1: error: expected constructor, destructor, or type conversion before ‘namespace’
  110 | namespace org{
      | ^~~~~~~~~
In file included from iceoryx/build/dependencies/install/include/ddscxx/dds/topic/TTopicDescription.hpp:23,
                 from iceoryx/build/dependencies/install/include/ddscxx/dds/topic/detail/TTopicDescriptionImpl.hpp:22,
                 from iceoryx/build/dependencies/install/include/ddscxx/dds/topic/detail/TopicDescription.hpp:21,
                 from iceoryx/build/dependencies/install/include/ddscxx/dds/topic/TopicDescription.hpp:22,
                 from iceoryx/build/dependencies/install/include/ddscxx/dds/topic/ddstopic.hpp:22,
                 from iceoryx/build/dependencies/install/include/ddscxx/dds/dds.hpp:35,
                 from iceoryx/iceoryx_dds/include/iceoryx_dds/dds/cyclone_data_reader.hpp:25,
                 from iceoryx/iceoryx_dds/source/iceoryx_dds/dds/cyclone_data_reader.cpp:18:
iceoryx/build/dependencies/install/include/ddscxx/dds/topic/TopicTraits.hpp:46:8: error: ‘dds::topic::topic_type_name’ is not a template
   46 | struct topic_type_name
      |        ^~~~~~~~~~~~~~~

from cyclonedds-cxx.

k0ekk0ek avatar k0ekk0ek commented on June 5, 2024

That probably means I have to update my PR too 🙂 I'll have a look

from cyclonedds-cxx.

k0ekk0ek avatar k0ekk0ek commented on June 5, 2024

This on top of my PR might work. I'll have do some testing tomorrow. Basically it includes datatopic.hpp after TopicTraits.hpp.

diff --git a/src/ddscxx/include/org/eclipse/cyclonedds/topic/TopicTraits.hpp b/src/ddscxx/include/org/eclipse/cyclonedds/topic/TopicTraits.hpp
index ab7307a..a1e7d71 100644
--- a/src/ddscxx/include/org/eclipse/cyclonedds/topic/TopicTraits.hpp
+++ b/src/ddscxx/include/org/eclipse/cyclonedds/topic/TopicTraits.hpp
@@ -21,7 +21,6 @@
 #include <vector>
 
 #include "org/eclipse/cyclonedds/topic/DataRepresentation.hpp"
-#include "org/eclipse/cyclonedds/topic/datatopic.hpp"
 
 struct ddsi_sertype;
 
diff --git a/src/idlcxx/src/traits.c b/src/idlcxx/src/traits.c
index 45ac21c..521264c 100644
--- a/src/idlcxx/src/traits.c
+++ b/src/idlcxx/src/traits.c
@@ -182,8 +182,10 @@ generate_traits(const idl_pstate_t *pstate, struct generator *generator)
   idl_visitor_t visitor;
   const char *sources[] = { NULL, NULL };
 
-  if (idl_fprintf(generator->header.handle, "#include \"org/eclipse/cyclonedds/topic/TopicTraits.hpp\"\n"
-        "#include \"org/eclipse/cyclonedds/topic/DataRepresentation.hpp\"\n\n"
+  if (idl_fprintf(generator->header.handle,
+        "#include \"org/eclipse/cyclonedds/topic/TopicTraits.hpp\"\n"
+        "#include \"org/eclipse/cyclonedds/topic/DataRepresentation.hpp\"\n"
+        "#include \"org/eclipse/cyclonedds/topic/datatopic.hpp\"\n\n"
         "namespace org {\n"
         "namespace eclipse {\n"
         "namespace cyclonedds {\n"

from cyclonedds-cxx.

dkroenke avatar dkroenke commented on June 5, 2024

@k0ekk0ek

I tested that patch and it helped a bit, nevertheless there are still some errors:

In file included from iceoryx/iceoryx_dds/include/iceoryx_dds/dds/cyclone_data_reader.hpp:23,
                 from iceoryx/iceoryx_dds/source/iceoryx_dds/dds/cyclone_data_reader.cpp:18:
iceoryx/build/iceoryx_dds_messages/Mempool.hpp:98:8: error: ‘topic_type_name’ is not a class template
   98 | struct topic_type_name<::Mempool::Chunk>
      |        ^~~~~~~~~~~~~~~
iceoryx/build/iceoryx_dds_messages/Mempool.hpp:99:1: error: explicit specialization of non-template ‘dds::topic::topic_type_name’
   99 | {
      | ^
iceoryx/build/iceoryx_dds_messages/Mempool.hpp:111:1: error: expected constructor, destructor, or type conversion before ‘namespace’
  111 | namespace org{
      | ^~~~~~~~~
In file included from iceoryx/build/dependencies/install/include/ddscxx/dds/topic/TTopicDescription.hpp:23,
                 from iceoryx/build/dependencies/install/include/ddscxx/dds/topic/detail/TTopicDescriptionImpl.hpp:22,
                 from iceoryx/build/dependencies/install/include/ddscxx/dds/topic/detail/TopicDescription.hpp:21,
                 from iceoryx/build/dependencies/install/include/ddscxx/dds/topic/TopicDescription.hpp:22,
                 from iceoryx/build/dependencies/install/include/ddscxx/dds/topic/ddstopic.hpp:22,
                 from iceoryx/build/dependencies/install/include/ddscxx/dds/dds.hpp:35,
                 from iceoryx/iceoryx_dds/include/iceoryx_dds/dds/cyclone_data_reader.hpp:25,
                 from iceoryx/iceoryx_dds/source/iceoryx_dds/dds/cyclone_data_reader.cpp:18:
iceoryx/build/dependencies/install/include/ddscxx/dds/topic/TopicTraits.hpp:46:8: error: ‘dds::topic::topic_type_name’ is not a template
   46 | struct topic_type_name
      |        ^~~~~~~~~~~~~~~
In file included from iceoryx/iceoryx_dds/include/iceoryx_dds/dds/cyclone_data_reader.hpp:23,
                 from iceoryx/iceoryx_dds/source/iceoryx_dds/dds/cyclone_data_reader.cpp:18:
iceoryx/build/iceoryx_dds_messages/Mempool.hpp:98:8: note: previous declaration here
   98 | struct topic_type_name<::Mempool::Chunk>
      |        ^~~~~~~~~~~~~~~
In file included from iceoryx/build/dependencies/install/include/ddscxx/dds/topic/detail/BuiltinTopic.hpp:23,
                 from iceoryx/build/dependencies/install/include/ddscxx/dds/topic/BuiltinTopic.hpp:22,
                 from iceoryx/build/dependencies/install/include/ddscxx/org/eclipse/cyclonedds/sub/AnyDataReaderDelegate.hpp:36,
                 from iceoryx/build/dependencies/install/include/ddscxx/dds/topic/detail/ContentFilteredTopic.hpp:31,
                 from iceoryx/build/dependencies/install/include/ddscxx/dds/topic/ContentFilteredTopic.hpp:22,
                 from iceoryx/build/dependencies/install/include/ddscxx/dds/topic/ddstopic.hpp:25,
                 from iceoryx/build/dependencies/install/include/ddscxx/dds/dds.hpp:35,
                 from iceoryx/iceoryx_dds/include/iceoryx_dds/dds/cyclone_data_reader.hpp:25,
                 from iceoryx/iceoryx_dds/source/iceoryx_dds/dds/cyclone_data_reader.cpp:18:
iceoryx/build/dependencies/install/include/ddscxx/dds/topic/detail/TTopicImpl.hpp: In static member function ‘static void dds::topic::detail::Topic<T>::discover_topics(const DomainParticipant&, std::vector<dds::topic::Topic<T, dds::topic::detail::Topic> >&, uint32_t)’:
iceoryx/build/dependencies/install/include/ddscxx/dds/topic/detail/TTopicImpl.hpp:365:34: error: ‘dds::topic::topic_type_name’ is not a template
  365 |     dp.delegate()->lookup_topics(topic_type_name<T>::value(), ddsc_topics, max_size);
      |                                  ^~~~~~~~~~~~~~~

from cyclonedds-cxx.

k0ekk0ek avatar k0ekk0ek commented on June 5, 2024

@dkroenke, my PR has a fix for this too. dds/topic/TopicTraits.hpp wasn't included by the generated code. We simply never ran into the problem because we included dds/dds.hpp before including the generated headers. Please let me know if this fix allows you to compile.

from cyclonedds-cxx.

dkroenke avatar dkroenke commented on June 5, 2024

I can confirm that this fix work, thanks for that!.

There is still the issue that an Segmentation fault occurs while reading samples from datareader #64 but that's not part of this issue here.

from cyclonedds-cxx.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.