ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

Compiler error while building a ROS2 code

asked 2018-06-22 03:39:18 -0500

aks gravatar image

I have installed ROS2 from binary on Windows.

I have also installed all the dependencies.

I can run the demo nodes.

Now I created an overlay workspace.

When I try to build it using ament build or ament build --symlink-install, it starts to compile but it does not find any compiler. The exact error is :

-- The C compiler identification is unknown
-- The CXX compiler identification is unknown
CMake Error at CMakeLists.txt:3 (project):
No CMAKE_C_COMPILER could be found.


CMake Error at CMakeLists.txt:3 (project):
No CMAKE_CXX_COMPILER could be found.

Do I need to install some other dependencies ? I have installed VS2015 and I am running the commands from a VS command prompt.

edit retag flag offensive close merge delete

Comments

Do all builds using CMake have the same error? Here's an example to see if any cmake build works: http://derekmolloy.ie/hello-world-int...

sloretz gravatar image sloretz  ( 2018-06-22 09:31:43 -0500 )edit

@sloretz : This works...I can generate the .sln project by using cmake .. Although I have not tried to build it. Shall I try that as well ? msbuild hello.sln fails

aks gravatar image aks  ( 2018-06-22 10:09:21 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2018-06-22 10:21:20 -0500

sloretz gravatar image

Is Visual Studio installed with C++ support? This is appears to be a CMake question rather than something specific to ROS 2. Try following the answers here https://stackoverflow.com/questions/3...

Not related to your question, Visual Studio 2015 is the right version if using ROS 2 Ardent or earlier. If you're using a nightly then Visual Studio 2017 will need to be installed.

edit flag offensive delete link more

Comments

Yes, VS2015 is installed with C++ support.

aks gravatar image aks  ( 2018-06-22 10:34:37 -0500 )edit

@sloretz : upgraded to Nighty, installed VS2017 with C++ support. Still the same error. Looking at the stackoverflow question, everything works as expected. Any suggestions ?

aks gravatar image aks  ( 2018-06-23 07:15:18 -0500 )edit

No idea. Can anything be built using cmake on that machine? Here's a minimal cmake project to try to build https://github.com/jameskbride/cmake-...

sloretz gravatar image sloretz  ( 2018-06-25 10:29:15 -0500 )edit

Question Tools

2 followers

Stats

Asked: 2018-06-22 03:39:18 -0500

Seen: 690 times

Last updated: Jun 22 '18