当前位置: 技术问答>linux和unix
编写C可执行程序测试linux内核驱动 编译出错
来源: 互联网 发布时间:2017-04-16
本文导语: 刚开始研究Android底层,在参照http://blog.csdn.net/luoshengyang/article/details/6571210 编写了相应的驱动,现在也写好对应的C测试程序了,但是编译时出错了。错误提示如下: root@brantyou-ubuntu:~/workspace/android-4.0.4_r1.2/external/yapp/h...
刚开始研究Android底层,在参照http://blog.csdn.net/luoshengyang/article/details/6571210
编写了相应的驱动,现在也写好对应的C测试程序了,但是编译时出错了。错误提示如下:
helloapp目录下有两个文件:Android.mk 和 hello.c
Android.mk的内容如下:
请教各位大大,这个该怎么解决??
编写了相应的驱动,现在也写好对应的C测试程序了,但是编译时出错了。错误提示如下:
root@brantyou-ubuntu:~/workspace/android-4.0.4_r1.2/external/yapp/helloapp# mm
============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=4.0.4
TARGET_PRODUCT=full
TARGET_BUILD_VARIANT=eng
TARGET_BUILD_TYPE=release
TARGET_BUILD_APPS=
TARGET_ARCH=arm
TARGET_ARCH_VARIANT=armv7-a
HOST_ARCH=x86
HOST_OS=linux
HOST_BUILD_TYPE=release
BUILD_ID=IMM76I
============================================
make:进入目录'/home/brantyou/workspace/android-4.0.4_r1.2'
make: *** 没有规则可以创建“out/target/product/generic/obj/EXECUTABLES/hello_intermediates/LINKED/hello”需要的目标“out/target/product/generic/obj/lib/crtbegin_dynamic.o”。 停止。
make:离开目录“/home/brantyou/workspace/android-4.0.4_r1.2”
helloapp目录下有两个文件:Android.mk 和 hello.c
Android.mk的内容如下:
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE_TAGS := optional
LOCAL_MODULE := hello
LOCAL_SRC_FILES := $(call all-subdir-c-files)
include $(BUILD_EXECUTABLE)
请教各位大大,这个该怎么解决??
|
贴下我的Android.mk
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_PRELINK_MODULE := false
LOCAL_LDLIBS += -Idl
LOCAL_CFLAGS += -static
LOCAL_C_INCLUDES +=
LOCAL_SRC_FILES := hello_test.c
LOCAL_MODULE := hello_test
LOCAL_MODULE_TAGS := optional
include $(BUILD_EXECUTABLE)
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_PRELINK_MODULE := false
LOCAL_LDLIBS += -Idl
LOCAL_CFLAGS += -static
LOCAL_C_INCLUDES +=
LOCAL_SRC_FILES := hello_test.c
LOCAL_MODULE := hello_test
LOCAL_MODULE_TAGS := optional
include $(BUILD_EXECUTABLE)