diff --git a/composition/README.md b/composition/README.md index 34c687477..f8a738e4b 100644 --- a/composition/README.md +++ b/composition/README.md @@ -41,7 +41,7 @@ The process will open each library and create one instance of each “rclcpp::No ros2 run composition dlopen_composition `ros2 pkg prefix composition`/lib/libtalker_component.so `ros2 pkg prefix composition`/lib/liblistener_component.so ``` -### Linktime Composition +### Linktime Composition (not supported on Windows) Similar to previous, this runs `linktime_composition` which **links all classes from libraries** that are registered under the **library_path** with the **linker**. diff --git a/composition/src/linktime_composition.cpp b/composition/src/linktime_composition.cpp index 95b212546..ce939abcb 100644 --- a/composition/src/linktime_composition.cpp +++ b/composition/src/linktime_composition.cpp @@ -36,6 +36,13 @@ int main(int argc, char * argv[]) std::vector> loaders; std::vector node_wrappers; + // Linktime composition is not supported on Windows. + #ifdef _WIN32 + RCLCPP_ERROR(logger, "Linktime composition is not supported on Windows."); + rclcpp::shutdown(); + return 0; + #endif // _WIN32 + std::vector libraries = { // all classes from libraries linked by the linker (rather then dlopen) // are registered under the library_path ""