Little-Potato-1990 / localization_in_auto_driving

901 stars 343 forks source link

程序编译出错 multiple definition of `main' #13

Closed suyunzzz closed 4 years ago

suyunzzz commented 4 years ago

您好,在编译(每一个tag)的时候会报错,报错如下: [ 93%] Building CXX object lidar_localization/CMakeFiles/front_end_node.dir/src/sensor_data/gnss_data.cpp.o [100%] Linking CXX executable /home/s/ros_ws/devel/lib/lidar_localization/front_end_node CMakeFiles/front_end_node.dir/build/CMakeFiles/3.5.1/CompilerIdCXX/CMakeCXXCompilerId.cpp.o: In function main: CMakeCXXCompilerId.cpp:(.text.startup+0x0): multiple definition of main'

CMakeFiles/front_end_node.dir/src/front_end_node.cpp.o:front_end_node.cpp:(.text.startup+0x0): first defined here

collect2: error: ld returned 1 exit status

lidar_localization/CMakeFiles/front_end_node.dir/build.make:974: recipe for target '/home/s/ros_ws/devel/lib/lidar_localization/front_end_node' failed

make[2]: *** [/home/s/ros_ws/devel/lib/lidar_localization/front_end_node] Error 1 CMakeFiles/Makefile2:492: recipe for target 'lidar_localization/CMakeFiles/front_end_node.dir/all' failed make[1]: *** [lidar_localization/CMakeFiles/front_end_node.dir/all] Error 2 Makefile:138: recipe for target 'all' failed make: *** [all] Error 2 Invoking "make -j12 -l12" failed 请问这可能是什么原因?

suyunzzz commented 4 years ago

抱歉,是我操作不当。您删了吧,我这好像不能删除