Sorry, your browser cannot access this site
This page requires browser support (enable) JavaScript
Learn more >

Install Dependencies

https://sunlogging.com/2024/07/30/cpp_linux/install_dev_tool/

Install CycloneDDS(C Core)

Obtain Cyclone DDS:

1
2
3
# 
git clone https://github.com/eclipse-cyclonedds/cyclonedds.git
cd cyclonedds

Building Cyclone DDS:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
# Enter build dir
mkdir build # First time
cd build

# Configure cmake
cmake -DCMAKE_INSTALL_PREFIX=<install-location> -DBUILD_EXAMPLES=ON ..
# Example
cmake -DCMAKE_INSTALL_PREFIX=/home/spencer/workspace/cyclonedds_installation -DBUILD_EXAMPLES=ON ..

# Build project, parallel: means use all CPU core.
cmake --build . --parallel

# Install build targe
cmake --build . --target install

Build CycloneDDS(C++ API)

Obtaining C++ API:

1
2
git clone https://github.com/eclipse-cyclonedds/cyclonedds-cxx.git
cd yclonedds-cxx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
# Enter build dir
mkdir build # First time
cd build

# Configure cmake
cmake -DCMAKE_PREFIX_PATH=<core-install-location> -DCMAKE_INSTALL_PREFIX=<install-location> -DBUILD_EXAMPLES=ON ..
# Example
cmake -DCMAKE_PREFIX_PATH=/home/spencer/workspace/cyclonedds_installation -DCMAKE_INSTALL_PREFIX=/home/spencer/workspace/cyclonedds_installation -DBUILD_EXAMPLES=ON ..

# Build project
cmake --build . --parallel

# Install build targe
cmake --build . --target install

Test your installation

1
2
3
4
5
6
7
8
# Enter working direction
cd cyclonedds-cxx/build/bin

# First terminal: Subscribe Helloworld message
./ddscxxHelloworldSubscriber

# Second terminal: Publish Helloworld message
./ddscxxHelloworldPublisher

Uninstalling Cyclone DDS

1
2
rm -rf cyclonedds
rm -rf <install-location>

评论