[英]Android NDK error No such file or directory for a path that exists in eclipse
I get the following error in eclipse: 我在Eclipse中收到以下错误:
**** Build of configuration Default for project com.opera.sdk.Opera ****
D:\android-ndk-r8b-windows\android-ndk-r8b\ndk-build.cmd all
"Compile++ thumb : operanative <= main.cpp
In file included from jni/src/main.cpp:4:0:
jni/include/controller.hpp:6:28: fatal error: gogi_opera_api.h: No such file or directory
compilation terminated.
make: *** [obj/local/armeabi/objs/operanative/src/main.o] Error 1
**** Build Finished ****
This is my Android.mk makefile: 这是我的Android.mk makefile:
MY_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_PATH := $(MY_PATH)
LOCAL_MODULE := libopera
LOCAL_SRC_FILES := libopera.a
include $(PREBUILT_STATIC_LIBRARY)
# final library
include $(CLEAR_VARS)
LOCAL_PATH := $(MY_PATH)
LOCAL_MODULE := operanative
LOCAL_SRC_FILES := src/main.cpp \
src/controller.cpp \
src/lock.cpp \
src/event.cpp \
src/dialog.cpp \
src/queue.cpp \
src/screen.cpp \
src/surface.cpp \
src/timer.cpp \
src/waiter.cpp \
src/window.cpp
LOCAL_C_INCLUDES := jni/include \
$(GOGI_SDK_PATH)/include \
$(GOGI_SDK_PATH)/jsplugins/ooif/include
LOCAL_WHOLE_STATIC_LIBRARIES := libopera
LOCAL_LDLIBS := -llog -ljnigraphics
include $(BUILD_SHARED_LIBRARY)
This is my Application.mk file: 这是我的Application.mk文件:
APP_STL:=stlport_static
APP_ABI := armeabi armeabi-v7a
APP_PLATFORM := android-14
And the controller.hpp file in questiuon has these defines: questiuon中的controller.hpp文件具有以下定义:
#ifndef CONTROLLER_HPP
#define CONTROLLER_HPP
#include <memory>
#include "gogi_opera_api.h"
#include "event.hpp"
#include "dialog.hpp"
#include "queue.hpp"
#include "screen.hpp"
#include "surface.hpp"
#include "timer.hpp"
#include "waiter.hpp"
#include "window.hpp"
I have the files in their proper locations and I've rewritten the application.mk as required, and yet i get the above build error. 我将文件放置在正确的位置,并且根据需要重写了application.mk,但是出现上述构建错误。 I hope someone can shed light on this.
我希望有人能对此有所启发。 Thanks in advance!
提前致谢!
change *.hpp to *.cpp 将* .hpp更改为* .cpp
It was working for me in echoprint project. 它在echoprint项目中为我工作。 I hope it works for you also.
我希望它也对您有用。
Thank You 谢谢
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.