OSG for Android Compilation summary

Source: Internet
Author: User

Recently, the OSG was compiled under Android. Briefly summarize:

0. INTRODUCTION Environment: WIN7 64-bit + Cygwin32 + OSG3.2.0

1. First introduced several blog posts, reference a lot, but did not solve my problems, but still have reference meaning.

http://blog.csdn.net/wonegequ1/article/details/46501397

http://blog.csdn.net/xuhaiyan8825/article/details/7847313

2. TheOSG version is very important , the above several blog posts did not solve my problem, the final reason is because I started with the OSG3.4 version, resulting in the following error has occurred:

'pthread_setconcurrency' has not been declared in this scope 'pthread_getconcurrency' has not been declared in this scope Pthread_yield' Not declared in this scope

The above only appears in the OSG3.4 version, and the solution is still being studied. After switching to OSG3.2, the problem disappears.

It is recommended to OSG English website http://www.openscenegraph.org/index.php/documentation/platform-specifics/android. OSG version of the compilation of the introduction of the comparison is clear, other blog posts are also reference to the official website. However, the author according to the official website to compile OSG3.4 or there are problems, this follow-up study.

3.Cygwin installation is cumbersome.   Loaded with 64-bit, reported the following error: CMake no longer defines WIN32 on cygwin! 。 There is a blog post said change to 32 is no problem, the result I changed 32, still have this problem. Then I can only ignore it, and finally the compilation is successful, so the private blog is not particularly reliable. Recommended post for installation of Cygwin: http://blog.chinaunix.net/uid-7547035-id-60230.html. Check the devel, all packed. Then in the actual use of Cygwin or will be reported missing some packages, back to re-search and reload the line. Finally to the GTA this package, or the report cannot find, this can be ignored, does not affect the compilation.

4. Follow-up will also encounter gdal_priv.h:no such file or directory errors, this way, when running Cygwin cmake, add the definition of its path:

-dgdal_dir=/cygdrive/d/openscenegraph-3.2.0/3rdparty/gdal. And then make it, there's no problem.

5. Have not understood Cygwin. Now there are some experiences. Cygwin provides a UNIX-like environment for Windows. Used to build the C + + development environment GCC. Because Android is a Linux-based open-source system, Linux is developed in C language. Android itself is developed in Java and uses JNI to invoke the local C language library to implement the operating system's underlying scheduling. But the underlying driver and operating system kernel is developed using C language and assembler. Android apps can be developed using Java, or you can use c++native to develop

6.. a file is a static link library file under Linux. So is a dynamic link library file under Linux

OpenGL ES 1.0:

CMake. -dosg_build_platform_android=on-ddynamic_openthreads=off-ddynamic_openscenegraph=off-dosg_gl_displaylists_ Available=off-dosg_gl_matrices_available=on-dosg_gl_vertex_funcs_available=on-dosg_gl_vertex_array_funcs_ Available=on-dosg_gl_fixed_function_available=on-dosg_cpp_exceptions_available=off-dosg_gl1_available=off-dosg _gl2_available=off-dosg_gl3_available=off-dosg_gles1_available=on-dosg_gles2_available=off-dandroid_abi= " Armeabi armeabi-v7a "-dandroid_platform=8-dandroid_stl=" gnustl_static "-dandroid_ndk=/cygdrive/d/01lib/ 04android-ndk-r9d-dj=4-dcmake_install_prefix=/cygdrive/d/openscenegraph-3.2.0/bin-dgdal_dir=/cygdrive/d/ Openscenegraph-3.2.0/3rdparty/gdal/include

OSG for Android Compilation summary

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.