From 41436e4121b703623d0bb2b6dea6eee3854779fd Mon Sep 17 00:00:00 2001 From: yadunund Date: Fri, 3 Oct 2025 00:47:05 -0700 Subject: [PATCH 1/2] Log message for linktime composition on Windows (#640) Signed-off-by: Yadunund Co-authored-by: Alejandro Hernandez Cordero (cherry picked from commit 8c49a99ccbc130ddc82d726ce038943b78038f75) # Conflicts: # composition/README.md --- composition/README.md | 4 ++++ composition/src/linktime_composition.cpp | 7 +++++++ 2 files changed, 11 insertions(+) diff --git a/composition/README.md b/composition/README.md index ed7a885ea..2fb561f11 100644 --- a/composition/README.md +++ b/composition/README.md @@ -41,7 +41,11 @@ 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 ``` +<<<<<<< HEAD ### Linktime Composition +======= +### Linktime Composition (not supported on Windows) +>>>>>>> 8c49a99 (Log message for linktime composition on Windows (#640)) 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 "" From 2d68d77638f4b2540fa64af10cdec0ceda97b283 Mon Sep 17 00:00:00 2001 From: Alejandro Hernandez Cordero Date: Fri, 3 Oct 2025 11:42:26 +0200 Subject: [PATCH 2/2] fixed merge Signed-off-by: Alejandro Hernandez Cordero --- composition/README.md | 4 ---- 1 file changed, 4 deletions(-) diff --git a/composition/README.md b/composition/README.md index 2fb561f11..616ff1e1c 100644 --- a/composition/README.md +++ b/composition/README.md @@ -41,11 +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 ``` -<<<<<<< HEAD -### Linktime Composition -======= ### Linktime Composition (not supported on Windows) ->>>>>>> 8c49a99 (Log message for linktime composition on Windows (#640)) Similar to previous, this runs `linktime_composition` which **links all classes from libraries** that are registered under the **library_path** with the **linker**.