We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
There is an issue if a package/project is called "template"
Required Info:
ros2 pkg create template
package.xml
<buildtool_depend>rosidl_default_generators</buildtool_depend> <build_depend>rosidl_default_generators</build_depend> <exec_depend>rosidl_default_runtime</exec_depend> <member_of_group>rosidl_interface_packages</member_of_group>
CMakeLists.txt
find_package(rosidl_default_generators REQUIRED) rosidl_generate_interfaces(${PROJECT_NAME} "msg/MyMsg.msg" ) ament_export_dependencies(rosidl_default_runtime)
msg/MyMsg.msg
int64 i
Compilation without error, or a warning when creating the package itself
Starting >>> template_nobug Finished <<< template_nobug [4.22s] Summary: 1 package finished [4.31s]
victor@XXX:~/workspace/ros2-bug-report$ colcon build Starting >>> template --- stderr: template In file included from /home/victor/workspace/ros2-bug-report/build/template/rosidl_typesupport_introspection_cpp/template/msg/my_msg__type_support.cpp:12:0: /home/victor/workspace/ros2-bug-report/build/template/rosidl_generator_cpp/template/msg/my_msg__struct.hpp:23:11: error: expected identifier before ‘template’ namespace template ^~~~~~~~ /home/victor/workspace/ros2-bug-report/build/template/rosidl_generator_cpp/template/msg/my_msg__struct.hpp:24:1: error: expected unqualified-id before ‘{’ token { ^ In file included from /opt/ros/eloquent/include/rosidl_typesupport_introspection_cpp/field_types.hpp:18:0, from /home/victor/workspace/ros2-bug-report/build/template/rosidl_typesupport_introspection_cpp/template/msg/my_msg__type_support.cpp:13: /opt/ros/eloquent/include/rosidl_typesupport_introspection_c/field_types.h:21:1: error: expected ‘;’ before ‘extern’ extern "C" ^~~~~~ In file included from /home/victor/workspace/ros2-bug-report/build/template/rosidl_typesupport_introspection_cpp/template/msg/my_msg__type_support.cpp:13:0: /opt/ros/eloquent/include/rosidl_typesupport_introspection_cpp/field_types.hpp:24:32: error: ‘rosidl_typesupport_introspection_c__ROS_TYPE_FLOAT’ was not declared in this scope const uint8_t ROS_TYPE_FLOAT = rosidl_typesupport_introspection_c__ROS_TYPE_FLOAT; ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /opt/ros/eloquent/include/rosidl_typesupport_introspection_cpp/field_types.hpp:24:32: note: suggested alternative: ‘template__rosidl_typesupport_introspection_cpp_EXPORTS’ const uint8_t ROS_TYPE_FLOAT = rosidl_typesupport_introspection_c__ROS_TYPE_FLOAT; ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ template__rosidl_typesupport_introspection_cpp_EXPORTS /opt/ros/eloquent/include/rosidl_typesupport_introspection_cpp/field_types.hpp:25:33: error: ‘rosidl_typesupport_introspection_c__ROS_TYPE_DOUBLE’ was not declared in this scope const uint8_t ROS_TYPE_DOUBLE = rosidl_typesupport_introspection_c__ROS_TYPE_DOUBLE; ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /opt/ros/eloquent/include/rosidl_typesupport_introspection_cpp/field_types.hpp:25:33: note: suggested alternative: ‘template__rosidl_typesupport_introspection_cpp_EXPORTS’ const uint8_t ROS_TYPE_DOUBLE = rosidl_typesupport_introspection_c__ROS_TYPE_DOUBLE; ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ template__rosidl_typesupport_introspection_cpp_EXPORTS /opt/ros/eloquent/include/rosidl_typesupport_introspection_cpp/field_types.hpp:26:38: error: ‘rosidl_typesupport_introspection_c__ROS_TYPE_LONG_DOUBLE’ was not declared in this scope const uint8_t ROS_TYPE_LONG_DOUBLE = rosidl_typesupport_introspection_c__ROS_TYPE_LONG_DOUBLE; ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /opt/ros/eloquent/include/rosidl_typesupport_introspection_cpp/field_types.hpp:27:31: error: ‘rosidl_typesupport_introspection_c__ROS_TYPE_CHAR’ was not declared in this scope const uint8_t ROS_TYPE_CHAR = rosidl_typesupport_introspection_c__ROS_TYPE_CHAR; ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /opt/ros/eloquent/include/rosidl_typesupport_introspection_cpp/field_types.hpp:27:31: note: suggested alternative: ‘template__rosidl_typesupport_introspection_cpp_EXPORTS’ const uint8_t ROS_TYPE_CHAR = rosidl_typesupport_introspection_c__ROS_TYPE_CHAR; ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ template__rosidl_typesupport_introspection_cpp_EXPORTS /opt/ros/eloquent/include/rosidl_typesupport_introspection_cpp/field_types.hpp:28:32: error: ‘rosidl_typesupport_introspection_c__ROS_TYPE_WCHAR’ was not declared in this scope const uint8_t ROS_TYPE_WCHAR = rosidl_typesupport_introspection_c__ROS_TYPE_WCHAR; ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /opt/ros/eloquent/include/rosidl_typesupport_introspection_cpp/field_types.hpp:28:32: note: suggested alternative: ‘template__rosidl_typesupport_introspection_cpp_EXPORTS’ const uint8_t ROS_TYPE_WCHAR = rosidl_typesupport_introspection_c__ROS_TYPE_WCHAR; ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ template__rosidl_typesupport_introspection_cpp_EXPORTS /opt/ros/eloquent/include/rosidl_typesupport_introspection_cpp/field_types.hpp:29:34: error: ‘rosidl_typesupport_introspection_c__ROS_TYPE_BOOLEAN’ was not declared in this scope const uint8_t ROS_TYPE_BOOLEAN = rosidl_typesupport_introspection_c__ROS_TYPE_BOOLEAN; ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /opt/ros/eloquent/include/rosidl_typesupport_introspection_cpp/field_types.hpp:29:34: note: suggested alternative: ‘template__rosidl_typesupport_introspection_cpp_EXPORTS’ const uint8_t ROS_TYPE_BOOLEAN = rosidl_typesupport_introspection_c__ROS_TYPE_BOOLEAN; ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ template__rosidl_typesupport_introspection_cpp_EXPORTS /opt/ros/eloquent/include/rosidl_typesupport_introspection_cpp/field_types.hpp:30:32: error: ‘rosidl_typesupport_introspection_c__ROS_TYPE_OCTET’ was not declared in this scope const uint8_t ROS_TYPE_OCTET = rosidl_typesupport_introspection_c__ROS_TYPE_OCTET; ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /opt/ros/eloquent/include/rosidl_typesupport_introspection_cpp/field_types.hpp:30:32: note: suggested alternative: ‘template__rosidl_typesupport_introspection_cpp_EXPORTS’ const uint8_t ROS_TYPE_OCTET = rosidl_typesupport_introspection_c__ROS_TYPE_OCTET; ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ template__rosidl_typesupport_introspection_cpp_EXPORTS /opt/ros/eloquent/include/rosidl_typesupport_introspection_cpp/field_types.hpp:31:32: error: ‘rosidl_typesupport_introspection_c__ROS_TYPE_UINT8’ was not declared in this scope const uint8_t ROS_TYPE_UINT8 = rosidl_typesupport_introspection_c__ROS_TYPE_UINT8; ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /opt/ros/eloquent/include/rosidl_typesupport_introspection_cpp/field_types.hpp:31:32: note: suggested alternative: ‘template__rosidl_typesupport_introspection_cpp_EXPORTS’ const uint8_t ROS_TYPE_UINT8 = rosidl_typesupport_introspection_c__ROS_TYPE_UINT8; ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ template__rosidl_typesupport_introspection_cpp_EXPORTS /opt/ros/eloquent/include/rosidl_typesupport_introspection_cpp/field_types.hpp:32:31: error: ‘rosidl_typesupport_introspection_c__ROS_TYPE_INT8’ was not declared in this scope const uint8_t ROS_TYPE_INT8 = rosidl_typesupport_introspection_c__ROS_TYPE_INT8; ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /opt/ros/eloquent/include/rosidl_typesupport_introspection_cpp/field_types.hpp:32:31: note: suggested alternative: ‘template__rosidl_typesupport_introspection_cpp_EXPORTS’ const uint8_t ROS_TYPE_INT8 = rosidl_typesupport_introspection_c__ROS_TYPE_INT8; ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ template__rosidl_typesupport_introspection_cpp_EXPORTS /opt/ros/eloquent/include/rosidl_typesupport_introspection_cpp/field_types.hpp:33:33: error: ‘rosidl_typesupport_introspection_c__ROS_TYPE_UINT16’ was not declared in this scope const uint8_t ROS_TYPE_UINT16 = rosidl_typesupport_introspection_c__ROS_TYPE_UINT16; ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /opt/ros/eloquent/include/rosidl_typesupport_introspection_cpp/field_types.hpp:33:33: note: suggested alternative: ‘template__rosidl_typesupport_introspection_cpp_EXPORTS’ const uint8_t ROS_TYPE_UINT16 = rosidl_typesupport_introspection_c__ROS_TYPE_UINT16; ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ template__rosidl_typesupport_introspection_cpp_EXPORTS /opt/ros/eloquent/include/rosidl_typesupport_introspection_cpp/field_types.hpp:34:32: error: ‘rosidl_typesupport_introspection_c__ROS_TYPE_INT16’ was not declared in this scope const uint8_t ROS_TYPE_INT16 = rosidl_typesupport_introspection_c__ROS_TYPE_INT16; ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /opt/ros/eloquent/include/rosidl_typesupport_introspection_cpp/field_types.hpp:34:32: note: suggested alternative: ‘template__rosidl_typesupport_introspection_cpp_EXPORTS’ const uint8_t ROS_TYPE_INT16 = rosidl_typesupport_introspection_c__ROS_TYPE_INT16; ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ template__rosidl_typesupport_introspection_cpp_EXPORTS /opt/ros/eloquent/include/rosidl_typesupport_introspection_cpp/field_types.hpp:35:33: error: ‘rosidl_typesupport_introspection_c__ROS_TYPE_UINT32’ was not declared in this scope const uint8_t ROS_TYPE_UINT32 = rosidl_typesupport_introspection_c__ROS_TYPE_UINT32; ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /opt/ros/eloquent/include/rosidl_typesupport_introspection_cpp/field_types.hpp:35:33: note: suggested alternative: ‘template__rosidl_typesupport_introspection_cpp_EXPORTS’ const uint8_t ROS_TYPE_UINT32 = rosidl_typesupport_introspection_c__ROS_TYPE_UINT32; ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ template__rosidl_typesupport_introspection_cpp_EXPORTS /opt/ros/eloquent/include/rosidl_typesupport_introspection_cpp/field_types.hpp:36:32: error: ‘rosidl_typesupport_introspection_c__ROS_TYPE_INT32’ was not declared in this scope const uint8_t ROS_TYPE_INT32 = rosidl_typesupport_introspection_c__ROS_TYPE_INT32; ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /opt/ros/eloquent/include/rosidl_typesupport_introspection_cpp/field_types.hpp:36:32: note: suggested alternative: ‘template__rosidl_typesupport_introspection_cpp_EXPORTS’ const uint8_t ROS_TYPE_INT32 = rosidl_typesupport_introspection_c__ROS_TYPE_INT32; ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ template__rosidl_typesupport_introspection_cpp_EXPORTS /opt/ros/eloquent/include/rosidl_typesupport_introspection_cpp/field_types.hpp:37:33: error: ‘rosidl_typesupport_introspection_c__ROS_TYPE_UINT64’ was not declared in this scope const uint8_t ROS_TYPE_UINT64 = rosidl_typesupport_introspection_c__ROS_TYPE_UINT64; ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /opt/ros/eloquent/include/rosidl_typesupport_introspection_cpp/field_types.hpp:37:33: note: suggested alternative: ‘template__rosidl_typesupport_introspection_cpp_EXPORTS’ const uint8_t ROS_TYPE_UINT64 = rosidl_typesupport_introspection_c__ROS_TYPE_UINT64; ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ template__rosidl_typesupport_introspection_cpp_EXPORTS /opt/ros/eloquent/include/rosidl_typesupport_introspection_cpp/field_types.hpp:38:32: error: ‘rosidl_typesupport_introspection_c__ROS_TYPE_INT64’ was not declared in this scope const uint8_t ROS_TYPE_INT64 = rosidl_typesupport_introspection_c__ROS_TYPE_INT64; ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /opt/ros/eloquent/include/rosidl_typesupport_introspection_cpp/field_types.hpp:38:32: note: suggested alternative: ‘template__rosidl_typesupport_introspection_cpp_EXPORTS’ const uint8_t ROS_TYPE_INT64 = rosidl_typesupport_introspection_c__ROS_TYPE_INT64; ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ template__rosidl_typesupport_introspection_cpp_EXPORTS /opt/ros/eloquent/include/rosidl_typesupport_introspection_cpp/field_types.hpp:39:33: error: ‘rosidl_typesupport_introspection_c__ROS_TYPE_STRING’ was not declared in this scope const uint8_t ROS_TYPE_STRING = rosidl_typesupport_introspection_c__ROS_TYPE_STRING; ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /opt/ros/eloquent/include/rosidl_typesupport_introspection_cpp/field_types.hpp:39:33: note: suggested alternative: ‘template__rosidl_typesupport_introspection_cpp_EXPORTS’ const uint8_t ROS_TYPE_STRING = rosidl_typesupport_introspection_c__ROS_TYPE_STRING; ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ template__rosidl_typesupport_introspection_cpp_EXPORTS /opt/ros/eloquent/include/rosidl_typesupport_introspection_cpp/field_types.hpp:40:34: error: ‘rosidl_typesupport_introspection_c__ROS_TYPE_WSTRING’ was not declared in this scope const uint8_t ROS_TYPE_WSTRING = rosidl_typesupport_introspection_c__ROS_TYPE_WSTRING; ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /opt/ros/eloquent/include/rosidl_typesupport_introspection_cpp/field_types.hpp:40:34: note: suggested alternative: ‘template__rosidl_typesupport_introspection_cpp_EXPORTS’ const uint8_t ROS_TYPE_WSTRING = rosidl_typesupport_introspection_c__ROS_TYPE_WSTRING; ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ template__rosidl_typesupport_introspection_cpp_EXPORTS /opt/ros/eloquent/include/rosidl_typesupport_introspection_cpp/field_types.hpp:42:34: error: ‘rosidl_typesupport_introspection_c__ROS_TYPE_MESSAGE’ was not declared in this scope const uint8_t ROS_TYPE_MESSAGE = rosidl_typesupport_introspection_c__ROS_TYPE_MESSAGE; ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /opt/ros/eloquent/include/rosidl_typesupport_introspection_cpp/field_types.hpp:42:34: note: suggested alternative: ‘template__rosidl_typesupport_introspection_cpp_EXPORTS’ const uint8_t ROS_TYPE_MESSAGE = rosidl_typesupport_introspection_c__ROS_TYPE_MESSAGE; ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ template__rosidl_typesupport_introspection_cpp_EXPORTS /opt/ros/eloquent/include/rosidl_typesupport_introspection_cpp/field_types.hpp:45:31: error: ‘rosidl_typesupport_introspection_c__ROS_TYPE_BOOL’ was not declared in this scope const uint8_t ROS_TYPE_BOOL = rosidl_typesupport_introspection_c__ROS_TYPE_BOOL; ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /opt/ros/eloquent/include/rosidl_typesupport_introspection_cpp/field_types.hpp:45:31: note: suggested alternative: ‘template__rosidl_typesupport_introspection_cpp_EXPORTS’ const uint8_t ROS_TYPE_BOOL = rosidl_typesupport_introspection_c__ROS_TYPE_BOOL; ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ template__rosidl_typesupport_introspection_cpp_EXPORTS /opt/ros/eloquent/include/rosidl_typesupport_introspection_cpp/field_types.hpp:46:31: error: ‘rosidl_typesupport_introspection_c__ROS_TYPE_BYTE’ was not declared in this scope const uint8_t ROS_TYPE_BYTE = rosidl_typesupport_introspection_c__ROS_TYPE_BYTE; ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /opt/ros/eloquent/include/rosidl_typesupport_introspection_cpp/field_types.hpp:46:31: note: suggested alternative: ‘template__rosidl_typesupport_introspection_cpp_EXPORTS’ const uint8_t ROS_TYPE_BYTE = rosidl_typesupport_introspection_c__ROS_TYPE_BYTE; ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ template__rosidl_typesupport_introspection_cpp_EXPORTS /opt/ros/eloquent/include/rosidl_typesupport_introspection_cpp/field_types.hpp:47:34: error: ‘rosidl_typesupport_introspection_c__ROS_TYPE_FLOAT32’ was not declared in this scope const uint8_t ROS_TYPE_FLOAT32 = rosidl_typesupport_introspection_c__ROS_TYPE_FLOAT32; ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /opt/ros/eloquent/include/rosidl_typesupport_introspection_cpp/field_types.hpp:47:34: note: suggested alternative: ‘template__rosidl_typesupport_introspection_cpp_EXPORTS’ const uint8_t ROS_TYPE_FLOAT32 = rosidl_typesupport_introspection_c__ROS_TYPE_FLOAT32; ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ template__rosidl_typesupport_introspection_cpp_EXPORTS /opt/ros/eloquent/include/rosidl_typesupport_introspection_cpp/field_types.hpp:48:34: error: ‘rosidl_typesupport_introspection_c__ROS_TYPE_FLOAT64’ was not declared in this scope const uint8_t ROS_TYPE_FLOAT64 = rosidl_typesupport_introspection_c__ROS_TYPE_FLOAT64; ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /opt/ros/eloquent/include/rosidl_typesupport_introspection_cpp/field_types.hpp:48:34: note: suggested alternative: ‘template__rosidl_typesupport_introspection_cpp_EXPORTS’ const uint8_t ROS_TYPE_FLOAT64 = rosidl_typesupport_introspection_c__ROS_TYPE_FLOAT64; ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ template__rosidl_typesupport_introspection_cpp_EXPORTS /home/victor/workspace/ros2-bug-report/build/template/rosidl_typesupport_introspection_cpp/template/msg/my_msg__type_support.cpp:19:11: error: expected identifier before ‘template’ namespace template ^~~~~~~~ /home/victor/workspace/ros2-bug-report/build/template/rosidl_typesupport_introspection_cpp/template/msg/my_msg__type_support.cpp:20:1: error: expected unqualified-id before ‘{’ token { ^ /home/victor/workspace/ros2-bug-report/build/template/rosidl_typesupport_introspection_cpp/template/msg/my_msg__type_support.cpp:81:1: error: expected ‘;’ before ‘namespace’ namespace rosidl_typesupport_introspection_cpp ^~~~~~~~~ /home/victor/workspace/ros2-bug-report/build/template/rosidl_typesupport_introspection_cpp/template/msg/my_msg__type_support.cpp: In function ‘const rosidl_message_type_support_t* rosidl_typesupport_introspection_cpp__get_message_type_support_handle__template__msg__MyMsg()’: /home/victor/workspace/ros2-bug-report/build/template/rosidl_typesupport_introspection_cpp/template/msg/my_msg__type_support.cpp:102:13: error: expected id-expression before ‘template’ return &::template::msg::rosidl_typesupport_introspection_cpp::MyMsg_message_type_support_handle; ^~~~~~~~ /home/victor/workspace/ros2-bug-report/build/template/rosidl_typesupport_introspection_cpp/template/msg/my_msg__type_support.cpp:102:13: error: expected ‘;’ before ‘template’ /home/victor/workspace/ros2-bug-report/build/template/rosidl_typesupport_introspection_cpp/template/msg/my_msg__type_support.cpp:102:13: error: expected primary-expression before ‘template’ make[2]: *** [CMakeFiles/template__rosidl_typesupport_introspection_cpp.dir/rosidl_typesupport_introspection_cpp/template/msg/my_msg__type_support.cpp.o] Error 1 make[1]: *** [CMakeFiles/template__rosidl_typesupport_introspection_cpp.dir/all] Error 2 make[1]: *** Attente des tâches non terminées.... In file included from /home/victor/workspace/ros2-bug-report/build/template/rosidl_typesupport_fastrtps_cpp/template/msg/my_msg__rosidl_typesupport_fastrtps_cpp.hpp:11:0, from /home/victor/workspace/ros2-bug-report/build/template/rosidl_typesupport_fastrtps_cpp/template/msg/dds_fastrtps/my_msg__type_support.cpp:4: /home/victor/workspace/ros2-bug-report/build/template/rosidl_generator_cpp/template/msg/my_msg__struct.hpp:23:11: error: expected identifier before ‘template’ namespace template ^~~~~~~~ /home/victor/workspace/ros2-bug-report/build/template/rosidl_generator_cpp/template/msg/my_msg__struct.hpp:24:1: error: expected unqualified-id before ‘{’ token { ^ In file included from /home/victor/workspace/ros2-bug-report/build/template/rosidl_typesupport_fastrtps_cpp/template/msg/dds_fastrtps/my_msg__type_support.cpp:4:0: /home/victor/workspace/ros2-bug-report/build/template/rosidl_typesupport_fastrtps_cpp/template/msg/my_msg__rosidl_typesupport_fastrtps_cpp.hpp:14:10: error: ‘#pragma’ is not allowed here # pragma GCC diagnostic push ^~~ /home/victor/workspace/ros2-bug-report/build/template/rosidl_typesupport_fastrtps_cpp/template/msg/my_msg__rosidl_typesupport_fastrtps_cpp.hpp:15:53: error: expected declaration before end of line # pragma GCC diagnostic ignored "-Wunused-parameter" ^ make[2]: *** [CMakeFiles/template__rosidl_typesupport_fastrtps_cpp.dir/rosidl_typesupport_fastrtps_cpp/template/msg/dds_fastrtps/my_msg__type_support.cpp.o] Error 1 make[1]: *** [CMakeFiles/template__rosidl_typesupport_fastrtps_cpp.dir/all] Error 2 make: *** [all] Error 2 --- Failed <<< template [1.87s, exited with code 2] Summary: 0 packages finished [1.98s] 1 package failed: template 1 package had stderr output: template
The problem is solved when the project is renamed to something else.
Thank you
The text was updated successfully, but these errors were encountered:
Thanks for reporting this. The problem is very similar to #272. Therefore I updated its title to also mention the package name.
I will go ahead and close this ticket as a duplicate.
Sorry, something went wrong.
No branches or pull requests
There is an issue if a package/project is called "template"
Bug report
Required Info:
Steps to reproduce issue
ros2 pkg create template
package.xml
the linesCMakeLists.txt
the linesmsg/MyMsg.msg
and inside the fileint64 i
Expected behavior
Compilation without error, or a warning when creating the package itself
Actual behavior
Additional information
The problem is solved when the project is renamed to something else.
Thank you
The text was updated successfully, but these errors were encountered: