mklink for hpp file got an error
Hi:
I am trying to build a ros2 demo which requires a symlink in the middle, and I got an error here:
Starting >>> examples_rclcpp_minimal_composition
--- stderr: examples_rclcpp_cbg_executor
CMake Error: failed to create symbolic link 'C:/dev/ros2_ws/install/include/examples_rclcpp_cbg_executor/ping_node.hpp': ��������ȷ��
CMake Error at ament_cmake_symlink_install/ament_cmake_symlink_install.cmake:302 (message):
Could not create symlink
'C:/dev/ros2_ws/install/include/examples_rclcpp_cbg_executor/ping_node.hpp'
pointing to
'C:/dev/ros2_ws/src/examples/rclcpp/executors/cbg_executor/include/examples_rclcpp_cbg_executor/ping_node.hpp'
then I did some tests to check if mklink is ready , below is my test:
C:\dev\ros2_ws>mklink 1.hpp C:\dev\ros2_ws\src\examples\rclcpp\executors\cbg_executor\include\examples_rclcpp_cbg_executor\ping_node.hpp
The device does not support symbolic links.
C:\dev\ros2_ws>mklink 1.exe C:\dev\ros2_ws\src\examples\rclcpp\executors\cbg_executor\include\examples_rclcpp_cbg_executor\ping_node.hpp
symbolic link created for 1.exe <<===>> C:\dev\ros2_ws\src\examples\rclcpp\executors\cbg_executor\include\examples_rclcpp_cbg_executor\ping_node.hpp
C:\dev\ros2_ws>mklink notepad.exe C:\Windows\System32\notepad.exe
symbolic link created for notepad.exe <<===>> C:\Windows\System32\notepad.exe
It looks like only when I make a symlink a file named after **hpp, it fails, in other cases , it works..
But I can't figure why and I can't pre symlink before building since it will clear the dest dir
My Windows configure is like this:
Windows 10,22H2 19045.4651
So, do u have any idea about this problem, I will be appreciate if u have any advice