【发布时间】:2021-03-19 13:11:20
【问题描述】:
我有简单的 Makefile 来编译我的程序。 makefile 中的代码如下
#
INCLUDE_DIR = /usr/src/linux/include
CC = g++
CFLAGS = -Wall
OBJS = demo.o
all:$(OBJS)
$(CC) $^ -o demo -lcsmc -pthread
clean:
rm -f *.o demo
我正在尝试将其转换为 ROS CmakeList.txt,这就是我包含我的库的方式
find_library(csmc REQUIRED)
我的可执行文件称为 mover
当我运行 catkin_make 时,我得到了我的函数不存在的错误
mover.cpp:(.text+0x2f): undefined reference to `SmcWSetResolveSpeed'
mover.cpp:(.text+0x58): undefined reference to `SmcWGetErrorString'
如何解决这个问题,让我的catkin_make 成功运行。
【问题讨论】: