我想在openwrt平台上交叉编译 amazon Alexa SDK ,但在执行curl/curl.h
时找不到make
,这是我的操作步骤:
创建一个cmake工具链文件,如下所示:
SET(CMAKE_SYSTEM_NAME Linux)
SET(CMAKE_SYSTEM_VERSION 1)
SET(CMAKE_C_COMPILER arm-openwrt-linux-muslgnueabi-gcc)
SET(CMAKE_CXX_COMPILER arm-openwrt-linux-muslgnueabi-g++)
SET(CMAKE_FIND_ROOT_PATH /home/sundq/workspace/Develop/out/astar-parrot/staging_dir/target/rootfs)
SET(CMAKE_SYSROOT /home/sundq/workspace/Develop/out/astar-parrot/staging_dir/target/rootfs)
SET(CMAKE_LIBRARY_PATH /home/sundq/workspace/Develop/out/astar-parrot/staging_dir/target/rootfs/usr/lib)
SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
SET(CMAKE_C_FLAGS "-I/home/sundq/workspace/Develop/out/astar-parrot/staging_dir/target/rootfs/usr/include")
SET(CMAKE_CXX_FLAGS "-I/home/sundq/workspace/Develop/out/astar-parrot/staging_dir/target/rootfs/usr/include")
像这样执行cmake
:
cmake ../avs-device-sdk-master-v1.0.2/ -DCMAKE_BUILD_TYPE=MINSIZEREL -DCMAKE_TOOLCHAIN_FILE=../toolchain.cmake
执行make
,输出为:
/AVSCommon/AVS/src/AlexaClientSDKInit.cpp:18:23: fatal error: curl/curl.h: No such file or directory
我确定curl / curl.h文件存在于/home/sundq/workspace/Develop/out/astar-parrot/staging_dir/target/rootfs/usr/include
目录中。