Problems with migrating live555 to Android

Source: Internet
Author: User

These days are quite troublesome. For RTSP server, we need to port live555 to Android. The common practice is to write an android program. MK, put it under the android source code tree, mm, you can, but I have always had a bunch of errors, and I compiled it under a separate ndk, it turned out to be normal, just in idle time, let's take a look at the compilation error prompts. I didn't find the C ++ libraries. The Compiler automatically adds these libraries to the ndk, in the android source code tree, you must add the following:

Local_ldflags + = $ (local_path )/.. /.. /prebuilts/ndk/android-ndk-r7/sources/cxx-STL/gnu-libstdc ++/libs/armeabi-v7a/libsupc ++. A \

$ (Local_path)/.../prebuilts/ndk/android-ndk-r7/sources/cxx-STL/gnu-libstdc ++/libs/armeabi-v7a/libgnustl_static.a

My live555 directory is under/live555/JNI/, So I need two ../

$ (Local_path) is a very important thing. It tells the compiler the path of the library to be linked, which is relative to the current path.

I am confused about a lot of errors reported by the compiler. I looked at the following and searched on the net. The answer was quite different. What did I say about compiling C ++ code with GCC, in fact, Android knows to compile with corresponding tools during compilation. It seems that the cause of compilation errors should start from the first few, rather than from the last few errors. Sometimes these errors are falsely reported. I have solved the first few errors, and all the subsequent errors are gone.

The difference between local_ldflags and local_ldlibs is that the latter looks like this: "-L $ (local_path )/.. /.. /prebuilts/ndk/android-ndk-r7/sources/cxx-STL/gnu-libstdc ++/libs/armeabi-v7a-lsupc ++"

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.