ROS Resources: Documentation | Support | Discussion Forum | Service Status | Q&A

Ament Tutorial: Build Fails with Symlink

Trying build the ament package builder for ROS2 on windows. Getting the following errors. any suggestion on how resolve these?

Following the steps mentioned:

"C:\Program Files\CMake\bin\cmake.exe" -DBUILD_TYPE=Release -P cmake_install.cmake
if %errorlevel% neq 0 goto :cmEnd
endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone
exit /b %1
if %errorlevel% neq 0 goto :VCEnd
– Install configuration: “Release”
– Execute custom install script
– Symlinking: D:/ROS/ros2_ws/install/share/ament_index/resource_index/package_run_dependencies/ament_cmake_core
failed to create symbolic link ‘D:/ROS/ros2_ws/install/share/ament_index/resource_index/package_run_dependencies/ament_cmake_core’: No error
CMake Error at ament_cmake_symlink_install/ament_cmake_symlink_install.cmake:293 (message):
Could not create symlink
pointing to
Call Stack (most recent call first):
ament_cmake_symlink_install/ament_cmake_symlink_install.cmake:149 (_ament_cmake_symlink_install_create_symlink)
ament_cmake_symlink_install/ament_cmake_symlink_install.cmake:305 (ament_cmake_symlink_install_files)
cmake_install.cmake:31 (include)

I get the same error on Windows. I traditionally never build with --symlink-install, so I haven’t seen this in the past.
Building without that option on Windows works very well.

without --symlink-install i get same error

Did you try removing your build and install folder before building without the --symlink-install flag?
to do so you can run

rmdir /S build install

and then run ament again