Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem when building the examples for the slaves #70

Open
sagilar opened this issue Dec 13, 2024 · 0 comments
Open

Problem when building the examples for the slaves #70

sagilar opened this issue Dec 13, 2024 · 0 comments

Comments

@sagilar
Copy link

sagilar commented Dec 13, 2024

Hi there,
I'm trying to recreate the examples provided in the repo, but unfortunately, those for the slaves are not building on my machine. Weirdly, the DCPLib and the examples for the masters were built smoothly, but all the examples for the slaves are showing many errors.
I haven't modified anything in the source or the CMakeLists, which makes me think there is something wrong with the examples, the library, or my PC settings.

I'm running on Ubuntu 24.04 with all the dependencies (explained in the the wiki) installed.

The log is quite long but it looks like this when running the cmake --build . in the root folder of the slave example:

[ 50%] Building CXX object CMakeFiles/dcpslave.dir/src/Main.cpp.o
In file included from /usr/local/include/DCPLib/core/dcp/helper/Helper.hpp:13,
                 from /home/au698550/Aarhus/DCP/DCPLib/example/slave/src/Slave.hpp:5,
                 from /home/au698550/Aarhus/DCP/DCPLib/example/slave/src/Main.cpp:1:
/usr/local/include/DCPLib/core/dcp/model/constant/DcpDataType.hpp:19:24: error: found ‘:’ in nested-name-specifier, expected ‘::’
   19 | enum class DcpDataType : uint8_t {
      |                        ^
      |                        ::
/usr/local/include/DCPLib/core/dcp/model/constant/DcpDataType.hpp:19:12: error: ‘DcpDataType’ has not been declared
   19 | enum class DcpDataType : uint8_t {
      |            ^~~~~~~~~~~
/usr/local/include/DCPLib/core/dcp/model/constant/DcpDataType.hpp:19:34: error: expected unqualified-id before ‘{’ token
   19 | enum class DcpDataType : uint8_t {
      |                                  ^
/usr/local/include/DCPLib/core/dcp/model/constant/DcpDataType.hpp:90:51: error: ‘DcpDataType’ has not been declared
   90 | static std::ostream &operator<<(std::ostream &os, DcpDataType type) {
      |                                                   ^~~~~~~~~~~
/usr/local/include/DCPLib/core/dcp/model/constant/DcpDataType.hpp: In function ‘std::ostream& operator<<(std::ostream&, int)’:
/usr/local/include/DCPLib/core/dcp/model/constant/DcpDataType.hpp:92:14: error: ‘DcpDataType’ has not been declared
   92 |         case DcpDataType::uint8:
      |              ^~~~~~~~~~~
/usr/local/include/DCPLib/core/dcp/model/constant/DcpDataType.hpp:94:14: error: ‘DcpDataType’ has not been declared
   94 |         case DcpDataType::uint16:

...



/usr/local/include/DCPLib/ethernet/dcp/driver/ethernet/udp/UdpDriver.hpp: In member function ‘void UdpDriver::registerSuccessfull()’:
/usr/local/include/DCPLib/ethernet/dcp/driver/ethernet/udp/UdpDriver.hpp:176:22: error: no match for call to ‘(std::string {aka std::__cxx11::basic_string<char>}) (asio::ip::udp::endpoint&)’
  176 |             to_string(masterEndpoint));
      |             ~~~~~~~~~^~~~~~~~~~~~~~~~
/home/au698550/Aarhus/DCP/DCPLib/example/slave/src/Slave.hpp: At global scope:
/home/au698550/Aarhus/DCP/DCPLib/example/slave/src/Slave.hpp:138:14: error: ‘DcpDataType’ was not declared in this scope
  138 |             {DcpDataType::float64, DcpDataType::uint64, DcpDataType::float64, DcpDataType::float64});
      |              ^~~~~~~~~~~
/home/au698550/Aarhus/DCP/DCPLib/example/slave/src/Slave.hpp:138:36: error: ‘DcpDataType’ was not declared in this scope
  138 |             {DcpDataType::float64, DcpDataType::uint64, DcpDataType::float64, DcpDataType::float64});
      |                                    ^~~~~~~~~~~
/home/au698550/Aarhus/DCP/DCPLib/example/slave/src/Slave.hpp:138:57: error: ‘DcpDataType’ was not declared in this scope
  138 |             {DcpDataType::float64, DcpDataType::uint64, DcpDataType::float64, DcpDataType::float64});
      |                                                         ^~~~~~~~~~~
/home/au698550/Aarhus/DCP/DCPLib/example/slave/src/Slave.hpp:138:79: error: ‘DcpDataType’ was not declared in this scope
  138 | taType::float64, DcpDataType::uint64, DcpDataType::float64, DcpDataType::float64});
      |                                                             ^~~~~~~~~~~

/home/au698550/Aarhus/DCP/DCPLib/example/slave/src/Slave.hpp:135:44: error: expected primary-expression before ‘(’ token
  135 |     const LogTemplate SIM_LOG = LogTemplate(
      |                                            ^
/home/au698550/Aarhus/DCP/DCPLib/example/slave/src/Slave.hpp:138:14: error: ‘DcpDataType’ has not been declared
  138 |             {DcpDataType::float64, DcpDataType::uint64, DcpDataType::float64, DcpDataType::float64});
      |              ^~~~~~~~~~~
/home/au698550/Aarhus/DCP/DCPLib/example/slave/src/Slave.hpp:138:36: error: ‘DcpDataType’ has not been declared
  138 |             {DcpDataType::float64, DcpDataType::uint64, DcpDataType::float64, DcpDataType::float64});
      |                                    ^~~~~~~~~~~
/home/au698550/Aarhus/DCP/DCPLib/example/slave/src/Slave.hpp:138:57: error: ‘DcpDataType’ has not been declared
  138 |             {DcpDataType::float64, DcpDataType::uint64, DcpDataType::float64, DcpDataType::float64});
      |                                                         ^~~~~~~~~~~
/home/au698550/Aarhus/DCP/DCPLib/example/slave/src/Slave.hpp:138:79: error: ‘DcpDataType’ has not been declared
  138 | taType::float64, DcpDataType::uint64, DcpDataType::float64, DcpDataType::float64});
      |                                                             ^~~~~~~~~~~

gmake[2]: *** [CMakeFiles/dcpslave.dir/build.make:76: CMakeFiles/dcpslave.dir/src/Main.cpp.o] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:83: CMakeFiles/dcpslave.dir/all] Error 2
gmake: *** [Makefile:136: all] Error 2

I'm attaching the full log for more information.

Thanks in advance.
log_slave.txt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant