Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Windows support #426

Open
wants to merge 1 commit into
base: ros2
Choose a base branch
from
Open

Add Windows support #426

wants to merge 1 commit into from

Conversation

traversaro
Copy link

The packages in this repo compile shared libraries, but does not expose any symbol on Windows, so no library is actually generated on Windows.

On Linux and macOS, everything compiles fine with -DBUILD_SHARED_LIBS:BOOL=ON as by default all the symbols are visible. We can achieve exactly the same behavior in Windows by setting to ON the CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS CMake variable, so this PR sets the CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS variable to ON, to ensure that the compilation works fine on Windows.

@ct2034
Copy link
Collaborator

ct2034 commented Jan 11, 2025

Thanks for your contributions. This is very helpful! Unfortunately I don't have a lot of experience with windows myself. But do you have an idea how I could include ci jobs testing on windows?

@ct2034 ct2034 self-assigned this Jan 11, 2025
@ct2034 ct2034 added bug This is a bug in the code (and not a new feature) ros2 PR tackling a ROS2 branch labels Jan 11, 2025
@traversaro
Copy link
Author

But do you have an idea how I could include ci jobs testing on windows?

I tried with official tooling in traversaro#1, but it is failing with the following message:

 CMake Error at CMakeLists.txt:14 (find_package):
    By not providing "Findament_cmake.cmake" in CMAKE_MODULE_PATH this project
    has asked CMake to find a package configuration file provided by
    "ament_cmake", but CMake did not find one.
  
    Could not find a package configuration file provided by "ament_cmake" with
    any of the following names:
  
      ament_cmakeConfig.cmake
      ament_cmake-config.cmake
  
    Add the installation prefix of "ament_cmake" to CMAKE_PREFIX_PATH or set
    "ament_cmake_DIR" to a directory containing one of the above files.  If
    "ament_cmake" provides a separate development package or SDK, be sure it
    has been installed.
  

However, I do not myself have a lot of experience with official ROS Windows binaries.

An alternative is to setup a job using robostack (https://robostack.github.io/index.html), in case you are interested you can find it in traversaro#2 . This second one is currently failing as ros-jazzy-launch-pytest is missing in ros jazzy, but I am adding it as part of RoboStack/ros-jazzy#16 .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This is a bug in the code (and not a new feature) ros2 PR tackling a ROS2 branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants