Using FreeType for an OpenGLES context (Cross-compile freetype?)

I'm using a cross-platform FreeType binding for C# called SharpFont, and to use it on Android i need my application to 'cross-compile' freetype into itself. I've looked around at guides and everything points to NDK, but the usage of NDK doesn't make sense. It's unix based for one, so i can't run any of the scripts that come with NDK. How can i have my application use FreeType?
The only things i find when searching google for FreeType, Android, Xamarin all together are stuff for Urho3D or are just plain unrelated.
Help Appreciated.


  • jezhjezh Member, Xamarin Team Xamurai

    Since FreeType library is based on c/c++, which cann’t not be called directly by android , so it is need NDK to help to generate .so file(which can be called by android) .
    Native Development Kit (NDK) is a collection of tools. It provides a range of tools to help developers quickly develop C/C++ dynamic libraries and automatically package .so file and Java code together as apk.

    Have you tried to use NDK? And have you encounter any problems? If so, you can post more detail about this.

  • I've tried to use the NDK and built into a folder i called freetype. Within this it generated:

    Inside of lib i have ''. I added this to my project, taking advantage of path sniffing, as detailed here on the Xamarin documentation for 'Using Native Libraries'.

    Unfortunately when i run my application, it crashes when my graphics DLL makes a call to the SharpFont library (which calls FreeType stuff) that it could not find ''.

    Perhaps i have either built it wrong, or am not using it correctly?

Sign In or Register to comment.