农妇山泉一亩田 发表于 2024-10-6 00:24:25

ROS报错The target name "test" is reserved when CTest testing is enable

ROS报错“The target name “test“ is reserved when CTest testing is enabled”

https://img2024.cnblogs.com/blog/3382553/202410/3382553-20241004203951217-1822373542.png注意:

现有特别情况,可执行文件名可以为test,但是映射名称不可以为test。
一样平常认为,可执行文件名和映射名称同名。
因为映射名称不可定名为test,故可执行文件最好不要定名为test。
纠正:

ROS遇到的问题“The target name “test“ is reserved when CTest testing is enabled”.
https://blog.csdn.net/qq_58011370/article/details/120035450一文中对该报错的解释有误,
https://img2024.cnblogs.com/blog/3382553/202410/3382553-20241004203951771-493364374.png对其解释为【可执行cpp文件不可定名为test】,在此纠正,解释如下
https://img2024.cnblogs.com/blog/3382553/202410/3382553-20241005160035781-351422293.jpg新月玫瑰!帅!前言

本文初编辑于2024年10月5日
CSDN主页:https://blog.csdn.net/rvdgdsva
博客园主页:https://www.cnblogs.com/hassle
博客园本文链接:https://www.cnblogs.com/hassle/p/18447212
下图1中源文件名为test.cpp,映射名称为haha,可编译。
https://img2024.cnblogs.com/blog/3382553/202410/3382553-20241004203953196-384353082.png下图2中源文件名为test.cpp,映射名称为test,报错
https://img2024.cnblogs.com/blog/3382553/202410/3382553-20241004203954046-1768482700.png下图3中源文件名为source.cpp,映射名称为test,报错。对比图2、图3可以看出,对映射名称有【不可定名为test】的定名要求。
https://img2024.cnblogs.com/blog/3382553/202410/3382553-20241004203954778-200181498.png下图2中源文件名为source.cpp,映射名称为source,可编译。
https://img2024.cnblogs.com/blog/3382553/202410/3382553-20241004203955711-1633375735.png
免责声明:如果侵犯了您的权益,请联系站长,我们会及时删除侵权内容,谢谢合作!更多信息从访问主页:qidao123.com:ToB企服之家,中国第一个企服评测及商务社交产业平台。
页: [1]
查看完整版本: ROS报错The target name "test" is reserved when CTest testing is enable