Issue Building on Raspberry Pi
thetoivonen opened this issue · comments
Attempting to make /usb_example/DJI_guidance_example on raspbian with g++-4.9.2
After fixing issue #13 in main.cpp...
make -f Makefile_noOpenCV
returns
g++ -g -Wall -I/usr/local/include -I../../../include -c main.cpp DJI_utility.h
g++ -g -Wall -I/usr/local/include -I../../../include -c DJI_utility.cpp DJI_utility.h
g++ -o guidance_example main.o DJI_utility.o -Wl,-rpath,./ -lpthread -lrt -L./ -L/usr/local/lib/ -lDJI_guidance -lusb-1.0
main.o: In function main': /home/pi/Guidance-SDK/examples/usb_example/DJI_guidance_example/main.cpp:178: undefined reference to
select_disparity_image(e_vbus_index)'
/home/pi/Guidance-SDK/examples/usb_example/DJI_guidance_example/main.cpp:185: undefined reference to select_motion()' /home/pi/Guidance-SDK/examples/usb_example/DJI_guidance_example/main.cpp:189: undefined reference to
get_device_type(e_device_type_)'
/home/pi/Guidance-SDK/examples/usb_example/DJI_guidance_example/main.cpp:192: undefined reference to get_image_size(int_, int_)' /home/pi/Guidance-SDK/examples/usb_example/DJI_guidance_example/main.cpp:251: undefined reference to
set_exposure_param(exposure_param)'
/home/pi/Guidance-SDK/examples/usb_example/DJI_guidance_example/main.cpp:273: undefined reference to `select_disparity_image(e_vbus_index)'
collect2: error: ld returned 1 exit status
Makefile_noOpenCV:12: recipe for target 'guidance_example' failed
make: *** [guidance_example] Error 1
The default lib is built on Ubuntu 14.04. There is no lib compiled under Raspberry Pi. You may need to use lib compiled on ARM or XU3.
Seems to be an issue with DJI_guidance.h as this is where the undefined references are defined.
I have the same issue. I use the ARM so lib and followed the developer sample steps one by one and still get this error. @thetoivonen found any solutions yet?
I was able to get it working by using the XU3 so library and compiling on the Pi with arm-linux-gnueabihf-g++-4.9