Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion composition/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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**.

Expand Down
7 changes: 7 additions & 0 deletions composition/src/linktime_composition.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,13 @@ int main(int argc, char * argv[])
std::vector<std::unique_ptr<class_loader::ClassLoader>> loaders;
std::vector<rclcpp_components::NodeInstanceWrapper> 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<std::string> libraries = {
// all classes from libraries linked by the linker (rather then dlopen)
// are registered under the library_path ""
Expand Down