gpt4 book ai didi

android - Cmake Ninja 错误 android. "missing and no known rule to make it"尽管文件存在

转载 作者:行者123 更新时间:2023-11-29 02:31:50 58 4
gpt4 key购买 nike

我不断得到一个

ninja: error: '/root/code/CalcLib/libCalcLibAndroidx86.a', needed by'/root/code/compcorpsdk/build/intermediates/cmake/prod/release/obj/x86/libJumboFFT.so',missing and no known rule to make it

尽管我检查了两个目录是否都存在正确的文件,并且我相信我在 CmakeList.txt 中正确设置了包含目录路径。

CMakeLists.txt

cmake_minimum_required(VERSION 3.4.1)

set(
P1 "/root/code/CalcLib"
CACHE STRING ""
)

message(${ANDROID_ABI})

file(GLOB CPP_FILES "*.cpp")

add_library(
JumboFFT
SHARED
${CPP_FILES}
)

include_directories(src/main/jni)
include_directories(${P1})

target_link_libraries(
JumboFFT
log
android
OpenSLES
${P1}/libCalcLibAndroid${ANDROID_ABI}.a
)

Gradle Assemble 输出 Gradle Asemble output text

最佳答案

set_target_properties 

在cmake中不喜欢相对路径

看这里: cmake:missing and no known rule to make it when I import a prebuilt library

关于android - Cmake Ninja 错误 android. "missing and no known rule to make it"尽管文件存在,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49286725/

58 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com