@@ -66,6 +66,30 @@ supports static linking of adapters. To use this functionality you would need to
66
66
create an application that uses Routing Service as a library component and
67
67
statically links to this ` FileAdapter ` library.
68
68
69
+ ### Cross-compilation
70
+
71
+ When you need to cross-compile the example, the above
72
+ command will not work, the assigned compiler won't be the cross-compiler and
73
+ errors may happen when linking against the cross-compiled Connext binaries.
74
+ To fix this, you have to create a file with the architecture name and call
75
+ CMake with a specific flag called `` -DCMAKE_TOOLCHAIN_FILE `` .
76
+ An example of the file to create with the toolchain settings (e.g. for an
77
+ ARM architectures):
78
+
79
+ ``` cmake
80
+ set(CMAKE_SYSTEM_NAME Linux)
81
+ set(toolchain_path "<path to>/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian")
82
+ set(CMAKE_C_COMPILER "${toolchain_path}/bin/arm-linux-gnueabihf-gcc")
83
+ set(CMAKE_CXX_COMPILER "${toolchain_path}/bin/arm-linux-gnueabihf-g++")
84
+ ```
85
+
86
+ Then you can call CMake like this:
87
+
88
+ ``` bash
89
+ cmake -DCONNEXTDDS_DIR=< connext dir> -DCMAKE_TOOLCHAIN_FILE=< toolchain file created above>
90
+ -DCONNEXTDDS_ARCH=< connext architecture> ..
91
+ ```
92
+
69
93
## Running C++ example
70
94
71
95
To run the example, you just need to run the following command from the ` build `
@@ -97,10 +121,10 @@ appropriate value of ```SHAPE_TOPIC``` before starting Routing Service.
97
121
To run Routing Service, you will need first to set up your environment as follows.
98
122
99
123
Before running the RTI Routing Service, you need to specify where the
100
- ` fileadapter ` library is located as shown below:
124
+ ` FileAdapterC++11 ` library is located as shown below:
101
125
102
126
``` bash
103
- $export RTI_LD_LIBRARY_PATH=< Connext DDS Directory> /lib/< Connext DDS Architecture> :< Path to fileadapter library>
127
+ $export RTI_LD_LIBRARY_PATH=< Connext DDS Directory> /lib/< Connext DDS Architecture> :< Path to FileAdapterC++11 library>
104
128
```
105
129
106
130
``` bash
0 commit comments