How to compile the C testing program corresponding to the android driver and the correct process

Source: Internet
Author: User

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.

 

 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.