File tree 11 files changed +268
-1
lines changed
cloud_discovery_service/library_api
struct_array_transf/c++11
web_integration_service/library_api/c++11
11 files changed +268
-1
lines changed Original file line number Diff line number Diff line change @@ -112,6 +112,30 @@ you want to link against. For example:
112
112
cmake -DCONNEXTDDS_ARCH=x64Linux3gcc5.4.0 ..
113
113
```
114
114
115
+ ### Cross-compilation
116
+
117
+ When you need to cross-compile the example, the above
118
+ command will not work, the assigned compiler won't be the cross-compiler and
119
+ errors may happen when linking against the cross-compiled Connext binaries.
120
+ To fix this, you have to create a file with the architecture name and call
121
+ CMake with a specific flag called `` -DCMAKE_TOOLCHAIN_FILE `` .
122
+ An example of the file to create with the toolchain settings (e.g. for an
123
+ ARM architectures):
124
+
125
+ ``` cmake
126
+ set(CMAKE_SYSTEM_NAME Linux)
127
+ set(toolchain_path "<path to>/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian")
128
+ set(CMAKE_C_COMPILER "${toolchain_path}/bin/arm-linux-gnueabihf-gcc")
129
+ set(CMAKE_CXX_COMPILER "${toolchain_path}/bin/arm-linux-gnueabihf-g++")
130
+ ```
131
+
132
+ Then you can call CMake like this:
133
+
134
+ ``` bash
135
+ cmake -DCONNEXTDDS_DIR=< connext dir> -DCMAKE_TOOLCHAIN_FILE=< toolchain file created above>
136
+ -DCONNEXTDDS_ARCH=< connext architecture> ..
137
+ ```
138
+
115
139
### CMake Build Infrastructure
116
140
117
141
The ` CMakeListst.txt ` script that builds this example uses a generic CMake
Original file line number Diff line number Diff line change @@ -112,9 +112,33 @@ you want to link against. For example:
112
112
cmake -DCONNEXTDDS_ARCH=x64Linux3gcc5.4.0 ..
113
113
```
114
114
115
+ ### Cross-compilation
116
+
117
+ When you need to cross-compile the example, the above
118
+ command will not work, the assigned compiler won't be the cross-compiler and
119
+ errors may happen when linking against the cross-compiled Connext binaries.
120
+ To fix this, you have to create a file with the architecture name and call
121
+ CMake with a specific flag called `` -DCMAKE_TOOLCHAIN_FILE `` .
122
+ An example of the file to create with the toolchain settings (e.g. for an
123
+ ARM architectures):
124
+
125
+ ``` cmake
126
+ set(CMAKE_SYSTEM_NAME Linux)
127
+ set(toolchain_path "<path to>/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian")
128
+ set(CMAKE_C_COMPILER "${toolchain_path}/bin/arm-linux-gnueabihf-gcc")
129
+ set(CMAKE_CXX_COMPILER "${toolchain_path}/bin/arm-linux-gnueabihf-g++")
130
+ ```
131
+
132
+ Then you can call CMake like this:
133
+
134
+ ``` bash
135
+ cmake -DCONNEXTDDS_DIR=< connext dir> -DCMAKE_TOOLCHAIN_FILE=< toolchain file created above>
136
+ -DCONNEXTDDS_ARCH=< connext architecture> ..
137
+ ```
138
+
115
139
### CMake Build Infrastructure
116
140
117
- The ` CMakeListst .txt` script that builds this example uses a generic CMake
141
+ The ` CMakeLists .txt` script that builds this example uses a generic CMake
118
142
function called ` connextdds_add_example ` that defines all the necessary constructs
119
143
to:
120
144
Original file line number Diff line number Diff line change @@ -117,6 +117,30 @@ you want to link against. For example:
117
117
cmake -DCONNEXTDDS_ARCH=x64Linux3gcc5.4.0 ..
118
118
` ` `
119
119
120
+ # ## Cross-compilation
121
+
122
+ When you need to cross-compile the example, the above
123
+ command will not work, the assigned compiler won' t be the cross-compiler and
124
+ errors may happen when linking against the cross-compiled Connext binaries.
125
+ To fix this, you have to create a file with the architecture name and call
126
+ CMake with a specific flag called ``-DCMAKE_TOOLCHAIN_FILE``.
127
+ An example of the file to create with the toolchain settings (e.g. for an
128
+ ARM architectures):
129
+
130
+ ```cmake
131
+ set(CMAKE_SYSTEM_NAME Linux)
132
+ set(toolchain_path "<path to>/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian")
133
+ set(CMAKE_C_COMPILER "${toolchain_path}/bin/arm-linux-gnueabihf-gcc")
134
+ set(CMAKE_CXX_COMPILER "${toolchain_path}/bin/arm-linux-gnueabihf-g++")
135
+ ```
136
+
137
+ Then you can call CMake like this:
138
+
139
+ ```bash
140
+ cmake -DCONNEXTDDS_DIR=<connext dir> -DCMAKE_TOOLCHAIN_FILE=<toolchain file created above>
141
+ -DCONNEXTDDS_ARCH=<connext architecture> ..
142
+ ```
143
+
120
144
### CMake Build Infrastructure
121
145
122
146
The `CMakeListst.txt` script that builds this example uses a generic CMake
Original file line number Diff line number Diff line change @@ -226,6 +226,30 @@ you want to link against. For example:
226
226
cmake -DCONNEXTDDS_ARCH=x64Linux3gcc5.4.0 ..
227
227
` ` `
228
228
229
+ # ## Cross-compilation
230
+
231
+ When you need to cross-compile the example, the above
232
+ command will not work, the assigned compiler won' t be the cross-compiler and
233
+ errors may happen when linking against the cross-compiled Connext binaries.
234
+ To fix this, you have to create a file with the architecture name and call
235
+ CMake with a specific flag called ``-DCMAKE_TOOLCHAIN_FILE``.
236
+ An example of the file to create with the toolchain settings (e.g. for an
237
+ ARM architectures):
238
+
239
+ ```cmake
240
+ set(CMAKE_SYSTEM_NAME Linux)
241
+ set(toolchain_path "<path to>/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian")
242
+ set(CMAKE_C_COMPILER "${toolchain_path}/bin/arm-linux-gnueabihf-gcc")
243
+ set(CMAKE_CXX_COMPILER "${toolchain_path}/bin/arm-linux-gnueabihf-g++")
244
+ ```
245
+
246
+ Then you can call CMake like this:
247
+
248
+ ```bash
249
+ cmake -DCONNEXTDDS_DIR=<connext dir> -DCMAKE_TOOLCHAIN_FILE=<toolchain file created above>
250
+ -DCONNEXTDDS_ARCH=<connext architecture> ..
251
+ ```
252
+
229
253
### CMake Build Infrastructure
230
254
231
255
The `CMakeListst.txt` script that builds this example uses a generic CMake
Original file line number Diff line number Diff line change @@ -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 `
Original file line number Diff line number Diff line change @@ -43,6 +43,30 @@ supports static linking of adapters. To use this functionality you would need to
43
43
create an application that uses Routing Service as a library component and
44
44
statically links to this ` FileAdapter ` library.
45
45
46
+ ### Cross-compilation
47
+
48
+ When you need to cross-compile the example, the above
49
+ command will not work, the assigned compiler won't be the cross-compiler and
50
+ errors may happen when linking against the cross-compiled Connext binaries.
51
+ To fix this, you have to create a file with the architecture name and call
52
+ CMake with a specific flag called `` -DCMAKE_TOOLCHAIN_FILE `` .
53
+ An example of the file to create with the toolchain settings (e.g. for an
54
+ ARM architectures):
55
+
56
+ ``` cmake
57
+ set(CMAKE_SYSTEM_NAME Linux)
58
+ set(toolchain_path "<path to>/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian")
59
+ set(CMAKE_C_COMPILER "${toolchain_path}/bin/arm-linux-gnueabihf-gcc")
60
+ set(CMAKE_CXX_COMPILER "${toolchain_path}/bin/arm-linux-gnueabihf-g++")
61
+ ```
62
+
63
+ Then you can call CMake like this:
64
+
65
+ ``` bash
66
+ cmake -DCONNEXTDDS_DIR=< connext dir> -DCMAKE_TOOLCHAIN_FILE=< toolchain file created above>
67
+ -DCONNEXTDDS_ARCH=< connext architecture> ..
68
+ ```
69
+
46
70
## Running C Example
47
71
48
72
Before running the example, take a look at file_bridge.xml. It defines the
Original file line number Diff line number Diff line change @@ -50,6 +50,33 @@ Here is more information about generating
50
50
create an application that uses Routing Service as a library component and
51
51
statically link to this adapter.
52
52
53
+ Cross-compilation
54
+ -----------------
55
+
56
+ When you need to cross-compile the example, the above
57
+ command will not work, the assigned compiler won't be the cross-compiler and
58
+ errors may happen when linking against the cross-compiled Connext binaries.
59
+ To fix this, you have to create a file with the architecture name and call
60
+ CMake with a specific flag called ``-DCMAKE_TOOLCHAIN_FILE ``.
61
+ An example of the file to create with the toolchain settings (e.g. for an
62
+ ARM architectures):
63
+
64
+ .. code ::
65
+
66
+ set(CMAKE_SYSTEM_NAME Linux)
67
+ set(toolchain_path "<path to>/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian")
68
+ set(CMAKE_C_COMPILER "${toolchain_path}/bin/arm-linux-gnueabihf-gcc")
69
+ set(CMAKE_CXX_COMPILER "${toolchain_path}/bin/arm-linux-gnueabihf-g++")
70
+
71
+
72
+ Then you can call CMake like this:
73
+
74
+ .. code ::
75
+
76
+ cmake -DCONNEXTDDS_DIR=<connext dir> -DCMAKE_TOOLCHAIN_FILE=<toolchain file created above>
77
+ -DCONNEXTDDS_ARCH=<connext architecture> ..
78
+
79
+
53
80
Running
54
81
-------
55
82
Original file line number Diff line number Diff line change @@ -26,6 +26,30 @@ If you generated Makefiles in the configuration process, run make to build the
26
26
example. Likewise, if you generated a Visual Studio solution, open the solution
27
27
and follow the regular build process.
28
28
29
+ ### Cross-compilation
30
+
31
+ When you need to cross-compile the example, the above
32
+ command will not work, the assigned compiler won't be the cross-compiler and
33
+ errors may happen when linking against the cross-compiled Connext binaries.
34
+ To fix this, you have to create a file with the architecture name and call
35
+ CMake with a specific flag called `` -DCMAKE_TOOLCHAIN_FILE `` .
36
+ An example of the file to create with the toolchain settings (e.g. for an
37
+ ARM architectures):
38
+
39
+ ``` cmake
40
+ set(CMAKE_SYSTEM_NAME Linux)
41
+ set(toolchain_path "<path to>/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian")
42
+ set(CMAKE_C_COMPILER "${toolchain_path}/bin/arm-linux-gnueabihf-gcc")
43
+ set(CMAKE_CXX_COMPILER "${toolchain_path}/bin/arm-linux-gnueabihf-g++")
44
+ ```
45
+
46
+ Then you can call CMake like this:
47
+
48
+ ``` bash
49
+ cmake -DCONNEXTDDS_DIR=< connext dir> -DCMAKE_TOOLCHAIN_FILE=< toolchain file created above>
50
+ -DCONNEXTDDS_ARCH=< connext architecture> ..
51
+ ```
52
+
29
53
## Running the Example
30
54
31
55
In two separate command prompt windows for the publisher and subscriber. Run the
Original file line number Diff line number Diff line change @@ -45,6 +45,30 @@ regular build process.
45
45
46
46
Upon success it will create a shared library file in the build directory.
47
47
48
+ ### Cross-compilation
49
+
50
+ When you need to cross-compile the example, the above
51
+ command will not work, the assigned compiler won't be the cross-compiler and
52
+ errors may happen when linking against the cross-compiled Connext binaries.
53
+ To fix this, you have to create a file with the architecture name and call
54
+ CMake with a specific flag called `` -DCMAKE_TOOLCHAIN_FILE `` .
55
+ An example of the file to create with the toolchain settings (e.g. for an
56
+ ARM architectures):
57
+
58
+ ``` cmake
59
+ set(CMAKE_SYSTEM_NAME Linux)
60
+ set(toolchain_path "<path to>/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian")
61
+ set(CMAKE_C_COMPILER "${toolchain_path}/bin/arm-linux-gnueabihf-gcc")
62
+ set(CMAKE_CXX_COMPILER "${toolchain_path}/bin/arm-linux-gnueabihf-g++")
63
+ ```
64
+
65
+ Then you can call CMake like this:
66
+
67
+ ``` bash
68
+ cmake -DCONNEXTDDS_DIR=< connext dir> -DCMAKE_TOOLCHAIN_FILE=< toolchain file created above>
69
+ -DCONNEXTDDS_ARCH=< connext architecture> ..
70
+ ```
71
+
48
72
## Running the Example
49
73
50
74
To run this example you will need two instances of * RTI Shapes Demo* and a
Original file line number Diff line number Diff line change @@ -56,6 +56,30 @@ Upon success it will create in the build directory:
56
56
57
57
- A subscriber application executable with name ` SensorDataSubscriber ` .
58
58
59
+ ### Cross-compilation
60
+
61
+ When you need to cross-compile the example, the above
62
+ command will not work, the assigned compiler won't be the cross-compiler and
63
+ errors may happen when linking against the cross-compiled Connext binaries.
64
+ To fix this, you have to create a file with the architecture name and call
65
+ CMake with a specific flag called `` -DCMAKE_TOOLCHAIN_FILE `` .
66
+ An example of the file to create with the toolchain settings (e.g. for an
67
+ ARM architectures):
68
+
69
+ ``` cmake
70
+ set(CMAKE_SYSTEM_NAME Linux)
71
+ set(toolchain_path "<path to>/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian")
72
+ set(CMAKE_C_COMPILER "${toolchain_path}/bin/arm-linux-gnueabihf-gcc")
73
+ set(CMAKE_CXX_COMPILER "${toolchain_path}/bin/arm-linux-gnueabihf-g++")
74
+ ```
75
+
76
+ Then you can call CMake like this:
77
+
78
+ ``` bash
79
+ cmake -DCONNEXTDDS_DIR=< connext dir> -DCMAKE_TOOLCHAIN_FILE=< toolchain file created above>
80
+ -DCONNEXTDDS_ARCH=< connext architecture> ..
81
+ ```
82
+
59
83
## Running the Example
60
84
61
85
To run this example you will need an instance of the publisher application, and
Original file line number Diff line number Diff line change @@ -109,6 +109,30 @@ you want to link against. For example:
109
109
cmake -DCONNEXTDDS_ARCH=x64Linux3gcc5.4.0 ..
110
110
```
111
111
112
+ ### Cross-compilation
113
+
114
+ When you need to cross-compile the example, the above
115
+ command will not work, the assigned compiler won't be the cross-compiler and
116
+ errors may happen when linking against the cross-compiled Connext binaries.
117
+ To fix this, you have to create a file with the architecture name and call
118
+ CMake with a specific flag called `` -DCMAKE_TOOLCHAIN_FILE `` .
119
+ An example of the file to create with the toolchain settings (e.g. for an
120
+ ARM architectures):
121
+
122
+ ``` cmake
123
+ set(CMAKE_SYSTEM_NAME Linux)
124
+ set(toolchain_path "<path to>/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian")
125
+ set(CMAKE_C_COMPILER "${toolchain_path}/bin/arm-linux-gnueabihf-gcc")
126
+ set(CMAKE_CXX_COMPILER "${toolchain_path}/bin/arm-linux-gnueabihf-g++")
127
+ ```
128
+
129
+ Then you can call CMake like this:
130
+
131
+ ``` bash
132
+ cmake -DCONNEXTDDS_DIR=< connext dir> -DCMAKE_TOOLCHAIN_FILE=< toolchain file created above>
133
+ -DCONNEXTDDS_ARCH=< connext architecture> ..
134
+ ```
135
+
112
136
### CMake Build Infrastructure
113
137
114
138
The CMakeListst.txt script that builds this example uses a generic CMake
You can’t perform that action at this time.
0 commit comments