Pinyinime Source NDK Compilation problem

Source: Internet
Author: User

Recently began to look at the input method related information, first I download a pinyinime source code, want to learn from it to understand the input method more in-depth, to be able to add an input method of the ability, the first step must be compiled through, I like to use the NDK way, the source copy to the Ubuntu system after the start of the compilation journey, The following two issues are fixed:

The first problem is the lack of file cutils/log.h, two files are used, respectively, Jni/android/com_android_inputmethod_pinyin_pinyindecoderservice.cpp and jni/ Share/userdict.cpp, in fact, this file is printed log used, we can define the Android log printing, I directly commented out, not a few places, the first file Com_android_inputmethod_pinyin _pinyindecoderservice.cpp in the Registernativemethods function two, the second file userdict.cpp is the definition of logd_perf used;

The second problem is android-ndk-r9d/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/. /lib/gcc/arm-linux-androideabi/4.6/. /.. /.. /.. /arm-linux-androideabi/bin/ld:error:cannot Find-lpthread, then modify the next jni/android.mk can be, the local_ldlibs + =-lpthread changed to Local_ Ldlibs + =-pthread.

This compiles the work to be accomplished.

Pinyinime Source NDK Compilation problem

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.