【ROS2】ROS2+Qt6在编译时报错:target_link_libraries
1、问题描述
在使用 ROS2 和 Qt6 混合编程时,在CMake编译阶段报错:
CMake Error at /home/laoer/Qt6.9/6.9.2/gcc_64/lib/cmake/Qt6/QtPublicPluginHelpers.cmake:483 (target_link_libraries):The plain signature for target_link_libraries has already been used withthe target "laoer_app". All uses of target_link_libraries with a targetmust be either all-keyword or all-plain.The uses of the plain signature are here:CMakeLists.txt:246 (target_link_libraries)
<