1. 程式人生 > >亞馬遜AVS C++ SDK 編譯錯誤解決

亞馬遜AVS C++ SDK 編譯錯誤解決

undefined reference to__atomic_store_8

buildroot 中整合AVS 編譯出現:

編譯器: Mipsel
錯誤警告:

Please see compilation error log below:
[ 21%] Linking CXX executable AttachmentManagerV2Test
Attachment/Common/libAttachmentCommonTestLib.a(Common.cpp.o): In function alexaClientSDK::avsCommon::utils::sds::SharedDataStream
<alexaClientSDK::avsCommon::utils::sds::InProcessSDSTraits>::BufferLayout::init(unsigned int, unsigned int)': Common.cpp: (.text._ZN14alexaClientSDK9avsCommon5utils3sds16SharedDataStreamINS2_18InProcessSDSTraitsEE12BufferLayout4initEjj[_ZN14alexaClientSDK9avsCommon5utils3sds16SharedDataStreamINS2_18InProcessSDSTraitsEE12BufferLayout4initEjj]+0x320): undefined reference to__atomic_store_8'
Common.cpp:

幸運的是 AVS C++ SDK Github 有人遇到該問題,也給出瞭解決方案

這裡寫圖片描述

avs-sdk/SampleApp/src/CMakeLists.txt 中新增set(CMAKE_CXX_LINK_FLAGS "${CMAKE_CXX_LINK_FLAGS} -latomic")問題解決