【发布时间】:2018-10-23 02:47:58
【问题描述】:
我有一个带有 CMakeLists.txt 的 ndk 项目,看起来像这样
cmake_minimum_required(VERSION 3.4.1)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wall -Werror")
add_library( # Specifies the name of the library.
main
# Sets the library as a shared library.
SHARED
# Provides a relative path to your source file(s).
main.c)
target_link_libraries(
android
log
)
它遵循 googlesamples github repo 中列出的所有 NDK 示例项目中的模式。我不断收到CMake Error at CMakeLists.txt (target_link_libraries),似乎大多数人都在用这条线解决它
add_library(debug <files Name>)
但没有人将其添加到日志记录中。我做错了什么?
【问题讨论】:
-
请将错误消息本身添加到问题帖子中。短语“CMakeLists.txt (target_link_libraries) 中的 CMake 错误”仅对错误位置有帮助,但对错误推理没有帮助。
标签: android cmake android-ndk