0
$\begingroup$

Rosanswers logo

Hi,

for a couple of days now, I've been trying to compile ROS2 for x86 under Windows. Because of other dependecies, I can't use x64. I tried a lot of stuff on my Windows 10 64bit machine that didn't work (i.e. recompile all necessary stuff for x86 and so on).

Now I'm working in a vanilla Windows 10 32bit VM and one problem seems to be, that I colcon always calls cmake with "Visual Studio 15 2017 Win64" and I can't change that. I tried calling colcon witn "--cmake-args -DCMAKE_CXX_FLAGS=-m32" which did not work either.

What I did on the vanilla Win10 32bit VM:

My questions are:

  1. What is the best way to compile ROS2 for Win32?
  2. How do I make colcon call cmake with "Visual Studio 15 2017" without "Win64"?

Thank you very much

Marossa


Originally posted by marossa on ROS Answers with karma: 3 on 2019-05-29

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

You'll likely need to modify colcon. It has a hardcoded list of supported visual studio versions.

https://github.com/colcon/colcon-cmake/blob/14ccfdc4aab94e2376d46c3906d7fc5d0c797c4b/colcon_cmake/task/cmake/build.py#L147-L162

It seems like it would need an option to change the target platform name https://cmake.org/cmake/help/latest/generator/Visual%20Studio%2015%202017.html#platform-selection . I recommend opening a PR or issue on https://github.com/colcon/colcon-cmake


Originally posted by sloretz with karma: 3061 on 2019-05-29

This answer was ACCEPTED on the original site

Post score: 1

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.