After the driver is compiled, another C program is written to test the driver, but the following error occurs during compilation:
Build/CORE/base_rules.mk: 166: *** frameworks/base/OpenGL/libs: module. target. etc. EGL. CFG already defined by development/tools/emulator/OpenGL/system/EGL. Stop.
Here it means:
The frameworks/base/OpenGL/libs directory has been defined in Development/tools/emulator/OpenGL/system/EGL.
Solution:
1. Change The egl name in the development/tools/emulator/OpenGL/system/directory, for example, EGL. Bak.
2. Modify the/development/tools/emulator/OpenGL/Android. mk file and
include $(EMUGL_PATH)/system/egl/Android.mk
Comment out this sentence.
Note: Do not delete the libs directory under the frameworks/base/OpenGL/path. It has been proved that a lot of problems will occur after this directory is deleted. I started to refer to what I said on the Internet. After deletion, I got a cup of cake.
Note the following before compiling the C driver test program:
1. Put the program under (your android source code directory)/external/
2. The Android. mk file and the corresponding program c file must exist. It is best to put it under the same level directory.
3. During compilation, go back to your android source code directory and use make to compile your project name.
Example:
1. In ~ /Workspace/android-4.0.4_r1.2/external/yapp/directory to create the helloapp directory
2. Create the corresponding helloapp. c file in the helloapp directory.
3. Create a unique Android. mk file in the helloapp directory.
4. Return ~ /Workspace/android-4.0.4_r1.2/directory, use
Make helloapp
Command to compile
5. After compilation is successful, it is similar to the following:
Install: out/target/product/generic/system/lib/libstdc++.soNotice file: bionic/libm/NOTICE -- out/target/product/generic/obj/NOTICE_FILES/src//system/lib/libm.so.txtInstall: out/target/product/generic/system/lib/libm.soInstall: out/target/product/generic/system/bin/helloapp
At this point, the driver test program has been compiled.