![]() Whenever we wish to use this toolchain we add it to the path as below. $NDK_PATH/build/tools/make-standalone-toolchain.sh –platform=$NDK_PLATFORM –install-dir=$PLATFORM_PREFIX Now we’ll simply use the NDK script to setup what we need there. I choose android-9, as do most examples I’ve seen, since it is still widely deployed, even on devices released this year. You’ll need to ensure you have the platform support files for this installed (you should probably already have these if you’re doing any NDK work). NKD_PLATFORM says which Android API version you are targetting. NDK_PATH simply says where you installed your Google NDK. In this case we’ll be targetting the default ARM chipset (if you wish to support another one you’ll need to duplicate this process with a different PLATFORM_PREFIX). Everything in this directory will be for one particular platform. The PLATFORM_PREFIX is simply where I want to put the toolchain. We need to create a directory which will host this toolchain, and the resulting libraries. You can refer to the “docs/STANDALONE-TOOLCHAIN.html” document from the Google NDK, it has good information if you want more details. Note that this “toolchain” is simply the setup for GCC to work as a cross-compiler. The first thing you need to do is create the toolchain needed to build the native binaries. You don’t actually need much from the build platform as most of the tools are available in the Google NDK, which I’ll assume you have installed. I do however suspect any relatively new Linux install will work just fine. I’m using Kubuntu 12.04 64-bit as my build machine. Now that I have a solution I thought I’d share the process. It took me a while to find enough references and examples before I was able to get it working. My goal, which is likely shared by many, was to get libpng and freetyp2 working for my native OpenGL application. Building native libraries for Android can be a bit confusing.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |