psdk3 sample_c++编译失败
已完成[ 11%] Linking CXX executable bin/dji_sdk_demo_linux_cxx
dji_sdk_demo_linux_cxx...
-- Found OpenCV installed in the system, will use it to display image in AdvancedSensing APIs
-- - Includes: /usr/include/opencv4
-- - Libraries: opencv_calib3d;opencv_core;opencv_dnn;opencv_features2d;opencv_flann;opencv_highgui;opencv_imgcodecs;opencv_imgproc;opencv_ml;opencv_objdetect;opencv_photo;opencv_stitching;opencv_video;opencv_videoio;opencv_alphamat;opencv_aruco;opencv_bgsegm;opencv_bioinspired;opencv_ccalib;opencv_datasets;opencv_dnn_objdetect;opencv_dnn_superres;opencv_dpm;opencv_face;opencv_freetype;opencv_fuzzy;opencv_hdf;opencv_hfs;opencv_img_hash;opencv_intensity_transform;opencv_line_descriptor;opencv_mcc;opencv_optflow;opencv_phase_unwrapping;opencv_plot;opencv_quality;opencv_rapid;opencv_reg;opencv_rgbd;opencv_saliency;opencv_shape;opencv_stereo;opencv_structured_light;opencv_superres;opencv_surface_matching;opencv_text;opencv_tracking;opencv_videostab;opencv_viz;opencv_ximgproc;opencv_xobjdetect;opencv_xphoto
Found FFMPEG FFMPEG_INCLUDE_DIR = /data/FFmpeg
Found FFMPEG FFMPEG_LIBRARIES = /usr/lib/aarch64-linux-gnu/libavcodec.so;/usr/lib/aarch64-linux-gnu/libavformat.so;/usr/lib/aarch64-linux-gnu/libavutil.so;/usr/lib/aarch64-linux-gnu/libswscale.so;/usr/lib/aarch64-linux-gnu/libvorbis.so;/usr/lib/aarch64-linux-gnu/libvorbisenc.so;/usr/lib/aarch64-linux-gnu/libz.so
-- Configuring done
-- Generating done
-- Build files have been written to: /data/Payload_SDK_5G/samples/sample_c++/platform/linux/manifold2/build
/usr/bin/ld: CMakeFiles/dji_sdk_demo_linux_cxx.dir/application/application.cpp.o: in function `Application::Application(int, char**)':
application.cpp:(.text+0x5c): undefined reference to `Osal_TaskSleepMs'
/usr/bin/ld: CMakeFiles/dji_sdk_demo_linux_cxx.dir/application/application.cpp.o: in function `Application::DjiUser_SetupEnvironment()':
application.cpp:(.text+0xcc): undefined reference to `Osal_TaskCreate'
/usr/bin/ld: application.cpp:(.text+0xd0): undefined reference to `Osal_TaskCreate'
/usr/bin/ld: application.cpp:(.text+0xd8): undefined reference to `Osal_TaskDestroy'
/usr/bin/ld: application.cpp:(.text+0xdc): undefined reference to `Osal_TaskDestroy'
/usr/bin/ld: application.cpp:(.text+0xe4): undefined reference to `Osal_TaskSleepMs'
/usr/bin/ld: application.cpp:(.text+0xe8): undefined reference to `Osal_TaskSleepMs'
/usr/bin/ld: application.cpp:(.text+0xf0): undefined reference to `Osal_MutexCreate'
/usr/bin/ld: application.cpp:(.text+0xf4): undefined reference to `Osal_MutexCreate'
/usr/bin/ld: application.cpp:(.text+0xfc): undefined reference to `Osal_MutexDestroy'
/usr/bin/ld: application.cpp:(.text+0x100): undefined reference to `Osal_MutexDestroy'
/usr/bin/ld: application.cpp:(.text+0x108): undefined reference to `Osal_MutexLock'
/usr/bin/ld: application.cpp:(.text+0x10c): undefined reference to `Osal_MutexLock'
/usr/bin/ld: application.cpp:(.text+0x114): undefined reference to `Osal_MutexUnlock'
/usr/bin/ld: application.cpp:(.text+0x118): undefined reference to `Osal_MutexUnlock'
/usr/bin/ld: application.cpp:(.text+0x120): undefined reference to `Osal_SemaphoreCreate'
/usr/bin/ld: application.cpp:(.text+0x124): undefined reference to `Osal_SemaphoreCreate'
/usr/bin/ld: application.cpp:(.text+0x12c): undefined reference to `Osal_SemaphoreDestroy'
/usr/bin/ld: application.cpp:(.text+0x130): undefined reference to `Osal_SemaphoreDestroy'
/usr/bin/ld: application.cpp:(.text+0x138): undefined reference to `Osal_SemaphoreWait'
/usr/bin/ld: application.cpp:(.text+0x13c): undefined reference to `Osal_SemaphoreWait'
/usr/bin/ld: application.cpp:(.text+0x144): undefined reference to `Osal_SemaphoreTimedWait'
/usr/bin/ld: application.cpp:(.text+0x148): undefined reference to `Osal_SemaphoreTimedWait'
/usr/bin/ld: application.cpp:(.text+0x150): undefined reference to `Osal_SemaphorePost'
/usr/bin/ld: application.cpp:(.text+0x154): undefined reference to `Osal_SemaphorePost'
/usr/bin/ld: application.cpp:(.text+0x15c): undefined reference to `Osal_Malloc'
/usr/bin/ld: application.cpp:(.text+0x160): undefined reference to `Osal_Malloc'
/usr/bin/ld: application.cpp:(.text+0x168): undefined reference to `Osal_Free'
/usr/bin/ld: application.cpp:(.text+0x16c): undefined reference to `Osal_Free'
/usr/bin/ld: application.cpp:(.text+0x174): undefined reference to `Osal_GetTimeMs'
/usr/bin/ld: application.cpp:(.text+0x178): undefined reference to `Osal_GetTimeMs'
/usr/bin/ld: application.cpp:(.text+0x180): undefined reference to `Osal_GetTimeUs'
/usr/bin/ld: application.cpp:(.text+0x184): undefined reference to `Osal_GetTimeUs'
/usr/bin/ld: application.cpp:(.text+0x1c0): undefined reference to `HalUart_Init'
/usr/bin/ld: application.cpp:(.text+0x1c4): undefined reference to `HalUart_Init'
/usr/bin/ld: application.cpp:(.text+0x1cc): undefined reference to `HalUart_DeInit'
/usr/bin/ld: application.cpp:(.text+0x1d0): undefined reference to `HalUart_DeInit'
/usr/bin/ld: application.cpp:(.text+0x1d8): undefined reference to `HalUart_WriteData'
/usr/bin/ld: application.cpp:(.text+0x1dc): undefined reference to `HalUart_WriteData'
/usr/bin/ld: application.cpp:(.text+0x1e4): undefined reference to `HalUart_ReadData'
/usr/bin/ld: application.cpp:(.text+0x1e8): undefined reference to `HalUart_ReadData'
/usr/bin/ld: application.cpp:(.text+0x1f0): undefined reference to `HalUart_GetStatus'
/usr/bin/ld: application.cpp:(.text+0x1f4): undefined reference to `HalUart_GetStatus'
/usr/bin/ld: application.cpp:(.text+0x1fc): undefined reference to `HalUsbBulk_Init'
/usr/bin/ld: application.cpp:(.text+0x200): undefined reference to `HalUsbBulk_Init'
/usr/bin/ld: application.cpp:(.text+0x208): undefined reference to `HalUsbBulk_DeInit'
/usr/bin/ld: application.cpp:(.text+0x20c): undefined reference to `HalUsbBulk_DeInit'
/usr/bin/ld: application.cpp:(.text+0x214): undefined reference to `HalUsbBulk_WriteData'
/usr/bin/ld: application.cpp:(.text+0x218): undefined reference to `HalUsbBulk_WriteData'
/usr/bin/ld: application.cpp:(.text+0x220): undefined reference to `HalUsbBulk_ReadData'
/usr/bin/ld: application.cpp:(.text+0x224): undefined reference to `HalUsbBulk_ReadData'
/usr/bin/ld: application.cpp:(.text+0x22c): undefined reference to `HalUsbBulk_GetDeviceInfo'
/usr/bin/ld: application.cpp:(.text+0x230): undefined reference to `HalUsbBulk_GetDeviceInfo'
/usr/bin/ld: application.cpp:(.text+0x238): undefined reference to `Osal_FileOpen'
/usr/bin/ld: application.cpp:(.text+0x23c): undefined reference to `Osal_FileOpen'
/usr/bin/ld: application.cpp:(.text+0x244): undefined reference to `Osal_FileClose'
/usr/bin/ld: application.cpp:(.text+0x248): undefined reference to `Osal_FileClose'
/usr/bin/ld: application.cpp:(.text+0x250): undefined reference to `Osal_FileWrite'
/usr/bin/ld: application.cpp:(.text+0x254): undefined reference to `Osal_FileWrite'
/usr/bin/ld: application.cpp:(.text+0x25c): undefined reference to `Osal_FileRead'
/usr/bin/ld: application.cpp:(.text+0x260): undefined reference to `Osal_FileRead'
/usr/bin/ld: application.cpp:(.text+0x268): undefined reference to `Osal_FileSync'
/usr/bin/ld: application.cpp:(.text+0x26c): undefined reference to `Osal_FileSync'
/usr/bin/ld: application.cpp:(.text+0x274): undefined reference to `Osal_FileSeek'
/usr/bin/ld: application.cpp:(.text+0x278): undefined reference to `Osal_FileSeek'
/usr/bin/ld: application.cpp:(.text+0x280): undefined reference to `Osal_DirOpen'
/usr/bin/ld: application.cpp:(.text+0x284): undefined reference to `Osal_DirOpen'
/usr/bin/ld: application.cpp:(.text+0x28c): undefined reference to `Osal_DirClose'
/usr/bin/ld: application.cpp:(.text+0x290): undefined reference to `Osal_DirClose'
/usr/bin/ld: application.cpp:(.text+0x298): undefined reference to `Osal_DirRead'
/usr/bin/ld: application.cpp:(.text+0x29c): undefined reference to `Osal_DirRead'
/usr/bin/ld: application.cpp:(.text+0x2a4): undefined reference to `Osal_Mkdir'
/usr/bin/ld: application.cpp:(.text+0x2a8): undefined reference to `Osal_Mkdir'
/usr/bin/ld: application.cpp:(.text+0x2b0): undefined reference to `Osal_Unlink'
/usr/bin/ld: application.cpp:(.text+0x2b4): undefined reference to `Osal_Unlink'
/usr/bin/ld: application.cpp:(.text+0x2bc): undefined reference to `Osal_Rename'
/usr/bin/ld: application.cpp:(.text+0x2c0): undefined reference to `Osal_Rename'
/usr/bin/ld: application.cpp:(.text+0x2c8): undefined reference to `Osal_Stat'
/usr/bin/ld: application.cpp:(.text+0x2cc): undefined reference to `Osal_Stat'
collect2: error: ld returned 1 exit status
make[2]: *** [CMakeFiles/dji_sdk_demo_linux_cxx.dir/build.make:269:bin/dji_sdk_demo_linux_cxx] 错误 1
make[1]: *** [CMakeFiles/Makefile2:95:CMakeFiles/dji_sdk_demo_linux_cxx.dir/all] 错误 2
make: *** [Makefile:103:all] 错误 2
-
C++ sample环境现在配的是在主路径下创建build进行编译,C++ sample子路径下sample编译环境链接文件不完整,后续会考虑完善,开发者也可以根据需要自行修改。 这部分已经补充到下述链接指导说明,供参考。 https://sdk-forum.dji.net/hc/zh-cn/articles/4408437830041-PSDK-3-0%E7%89%88%E6%9C%ACOSDK-OSDK-5-0-%E9%83%A8%E5%88%86%E7%9B%B8%E5%85%B3%E4%BB%8B%E7%BB%8D%E4%B8%8E%E6%8C%87%E5%BC%95 ![](https://djisdksupport.zendesk.com/attachments/token/ImpkJavYKlkKoccpMfhctOaeB/?name=inline-1589395444.png)
请先登录再写评论。
评论
1 条评论