dji-sdk / Guidance-SDK

The official Guidance SDK package for Windows, Ubuntu and XU3.
134 stars 98 forks source link

Undefined reference #34

Open lemonL opened 6 years ago

lemonL commented 6 years ago

/home/kitty/Guidance-SDK-master/demo/catkin_ws/src/include/libDJI_guidance.so:对‘libusb_get_device_descriptor’未定义的引用 /home/kitty/Guidance-SDK-master/demo/catkin_ws/src/include/libDJI_guidance.so:对‘libusb_init’未定义的引用 /home/kitty/Guidance-SDK-master/demo/catkin_ws/src/include/libDJI_guidance.so:对‘libusb_detach_kernel_driver’未定义的引用 /home/kitty/Guidance-SDK-master/demo/catkin_ws/src/include/libDJI_guidance.so:对‘libusb_open’未定义的引用 /home/kitty/Guidance-SDK-master/demo/catkin_ws/src/include/libDJI_guidance.so:对‘libusb_get_device_list’未定义的引用 /home/kitty/Guidance-SDK-master/demo/catkin_ws/src/include/libDJI_guidance.so:对‘libusb_exit’未定义的引用 /home/kitty/Guidance-SDK-master/demo/catkin_ws/src/include/libDJI_guidance.so:对‘libusb_get_device’未定义的引用 /home/kitty/Guidance-SDK-master/demo/catkin_ws/src/include/libDJI_guidance.so:对‘libusb_get_active_config_descriptor’未定义的引用 /home/kitty/Guidance-SDK-master/demo/catkin_ws/src/include/libDJI_guidance.so:对‘libusb_bulk_transfer’未定义的引用 /home/kitty/Guidance-SDK-master/demo/catkin_ws/src/include/libDJI_guidance.so:对‘libusb_free_device_list’未定义的引用 /home/kitty/Guidance-SDK-master/demo/catkin_ws/src/include/libDJI_guidance.so:对‘libusb_claim_interface’未定义的引用 /home/kitty/Guidance-SDK-master/demo/catkin_ws/src/include/libDJI_guidance.so:对‘libusb_free_config_descriptor’未定义的引用 collect2: error: ld returned 1 exit status CMakeFiles/dji_sdk_node.dir/build.make:519: recipe for target '/home/kitty/Guidance-SDK-master/demo/catkin_ws/devel/lib/dji_sdk/dji_sdk_node' failed make[2]: [/home/kitty/Guidance-SDK-master/demo/catkin_ws/devel/lib/dji_sdk/dji_sdk_node] Error 1 CMakeFiles/Makefile2:707: recipe for target 'CMakeFiles/dji_sdk_node.dir/all' failed make[1]: [CMakeFiles/dji_sdk_node.dir/all] Error 2 Makefile:138: recipe for target 'all' failed make: *** [all] Error 2 Invoking "make -j4 -l4" failed

lemonL commented 6 years ago

CMakeError.log

Determining if the pthread_create exist failed with the following output: Change Dir: /home/kitty/Guidance-SDK-master/demo/catkin_ws/build/CMakeFiles/CMakeTmp

Run Build Command:"/usr/bin/make" "cmTC_19694/fast" /usr/bin/make -f CMakeFiles/cmTC_19694.dir/build.make CMakeFiles/cmTC_19694.dir/build make[1]: Entering directory '/home/kitty/Guidance-SDK-master/demo/catkin_ws/build/CMakeFiles/CMakeTmp' Building C object CMakeFiles/cmTC_19694.dir/CheckSymbolExists.c.o /usr/bin/cc -o CMakeFiles/cmTC_19694.dir/CheckSymbolExists.c.o -c /home/kitty/Guidance-SDK-master/demo/catkin_ws/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c Linking C executable cmTC_19694 /usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_19694.dir/link.txt --verbose=1 /usr/bin/cc CMakeFiles/cmTC_19694.dir/CheckSymbolExists.c.o -o cmTC_19694 -rdynamic CMakeFiles/cmTC_19694.dir/CheckSymbolExists.c.o:在函数‘main’中: CheckSymbolExists.c:(.text+0x16):对‘pthread_create’未定义的引用 collect2: error: ld returned 1 exit status CMakeFiles/cmTC_19694.dir/build.make:97: recipe for target 'cmTC_19694' failed make[1]: [cmTC_19694] Error 1 make[1]: Leaving directory '/home/kitty/Guidance-SDK-master/demo/catkin_ws/build/CMakeFiles/CMakeTmp' Makefile:126: recipe for target 'cmTC_19694/fast' failed make: [cmTC_19694/fast] Error 2

File /home/kitty/Guidance-SDK-master/demo/catkin_ws/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c: / /

include

int main(int argc, char** argv) { (void)argv;

ifndef pthread_create

return ((int*)(&pthread_create))[argc];

else

(void)argc; return 0;

endif

}

Determining if the function pthread_create exists in the pthreads failed with the following output: Change Dir: /home/kitty/Guidance-SDK-master/demo/catkin_ws/build/CMakeFiles/CMakeTmp

Run Build Command:"/usr/bin/make" "cmTC_71697/fast" /usr/bin/make -f CMakeFiles/cmTC_71697.dir/build.make CMakeFiles/cmTC_71697.dir/build make[1]: Entering directory '/home/kitty/Guidance-SDK-master/demo/catkin_ws/build/CMakeFiles/CMakeTmp' Building C object CMakeFiles/cmTC_71697.dir/CheckFunctionExists.c.o /usr/bin/cc -DCHECK_FUNCTION_EXISTS=pthread_create -o CMakeFiles/cmTC_71697.dir/CheckFunctionExists.c.o -c /usr/share/cmake-3.5/Modules/CheckFunctionExists.c Linking C executable cmTC_71697 /usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_71697.dir/link.txt --verbose=1 /usr/bin/cc -DCHECK_FUNCTION_EXISTS=pthread_create CMakeFiles/cmTC_71697.dir/CheckFunctionExists.c.o -o cmTC_71697 -rdynamic -lpthreads /usr/bin/ld: 找不到 -lpthreads collect2: error: ld returned 1 exit status CMakeFiles/cmTC_71697.dir/build.make:97: recipe for target 'cmTC_71697' failed make[1]: [cmTC_71697] Error 1 make[1]: Leaving directory '/home/kitty/Guidance-SDK-master/demo/catkin_ws/build/CMakeFiles/CMakeTmp' Makefile:126: recipe for target 'cmTC_71697/fast' failed make: [cmTC_71697/fast] Error 2

seanavery commented 6 years ago

I am having this same issue @lemonL. Were you able to get around it?