dji-sdk / Guidance-SDK

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

Issue Building on Raspberry Pi #20

Closed thetoivonen closed 8 years ago

thetoivonen commented 8 years ago

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 toselect_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 toget_device_type(e_devicetype)' /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 toset_exposure_param(_exposureparam)' /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

tangketan commented 8 years ago

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.

thetoivonen commented 8 years ago

Seems to be an issue with DJI_guidance.h as this is where the undefined references are defined.

janwillemm commented 8 years ago

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?

thetoivonen commented 8 years ago

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