add_executable(test_pkg src/test_pkg.cpp)
target_link_libraries(test_pkg
${catkin_LIBRARIES}
multiply
/home/xp/ADS-master/AdsLib-Linux.a pthread
)
这里我用的是AdsLib-Linux.a,为了使用多线程在后边加入了pthread参数
然后在工程中加入相应的头文件位置(可以放在工程里,使用相对路径更好)
#include "/home/xp/Downloads/catkin_test/src/test_package/include/AdsLib.h"
#include "/home/xp/Downloads/catkin_test/src/test_package/include/AdsNotificationOOI.h"
#include "/home/xp/Downloads/catkin_test/src/test_package/include/AdsVariable.h"