open-dis / open-dis-cpp

C++ implementation of the IEEE-1278.1 Distributed Interactive Simulation (DIS) application protocol v6 and v7
BSD 2-Clause "Simplified" License
90 stars 65 forks source link

How to build example with DIS version 7 #93

Open nadja-w opened 7 months ago

nadja-w commented 7 months ago

I tried building the Receiver-Example with DIS version 7. In order to do this I changed the target_link_libraries from OpenDIS6to OpenDIS7. Furthermore I changed the Includes for the EntityStatePdu from #include <dis6/EntityStatePdu.h> to #include <dis7/EntityStatePdu.h> in EntityStatePduProcessor.h and main_receive.cpp. When I try to build, I get an error about "type redefinition" of DIS::Pdu. In my opinion this makes sense, since there is still the Include #include <dis6/utils/IncomingMessage.h>. That include references dis6/Pdu.h.

What exactly am I doing wrong? How can I change the example to use DIS version 7?