简体   繁体   English

Android NDK在Eclipse中包含路径

[英]Android NDK Include Path In Eclipse

I have an Android NDK project that builds fine in cygwin using ndk-build. 我有一个Android NDK项目,可以使用ndk-build在cygwin中很好地构建。

However, I wanted to have it build in eclipse, so I installed C/C++ Development tools into my ADT version of eclipse and added native support to the project in eclipse. 但是,我希望将其构建在eclipse中,因此我在ADT版本的eclipse中安装了C / C ++开发工具,并为eclipse中的项目添加了本机支持。 However, after building, I get the following error: 但是,构建后,出现以下错误:

fatal error: timer.h: No such file or directory

In my original Android.mk file, I have the following include that lets it work in cygwin: 在我最初的Android.mk文件中,我具有以下包括使其可以在cygwin中运行的文件:

LOCAL_C_INCLUDES := /cygdrive/c/ADT/includes/

I tried adding a similar include path (C:\\ADT\\includes) to Project->Properties->C/C++ General->Paths and Symbols, but still no luck. 我尝试将类似的包含路径(C:\\ ADT \\ includes)添加到Project-> Properties-> C / C ++ General-> Paths and Symbols,但还是没有运气。 Any suggestions? 有什么建议么?

The fix was to use windows paths LOCAL_C_INCLUDES := C:/ADT/includes/ 解决方法是使用Windows路径LOCAL_C_INCLUDES := C:/ADT/includes/

Note that using the following works as well (per cpu2's answer) 请注意,也可以使用以下方法(根据cpu2的回答)

LOCAL_CFLAGS := -IC:/ADT/includes/

-I/path/to/includes到您的标志中。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM