User Tools

Site Tools


android:setting_up_ndk_to_build_the_library

This is an old revision of the document!


The AGTEK Lib project contains native code for the TriMesh. In order to compile and test the library you must add a native “builder” to your Eclipse project.

The following instructions are from this web site: http://www.rbgrn.net/content/348-get-your-eclipse-integrated-ndk-on

Here is what you need to do

  1. Import AGTEK_Lib into Eclipse (via SVN import)
  2. Open properties on AGTEK_Lib
  3. Click the resource “Builder”
  4. Click “New…” on the right side.
  5. Select “Program” as the configuration type.
  6. name the builder “NDK_Builder”
  7. Location - c:\cygwin\bin\bash.exe
  8. Working Directory - c:\cygwin\bin
  9. Arguments(for NDK r4):
    —-login -c “cd /cygdrive/c/<myapp_project_dir> && /cygdrive/c/Android_NDK/ndk-build”
    Substitute the string “myapp_project_dir” and the location of the Android NDK appropriately. Make sure you have the two hyphens before login and the quotes after the hyphen-c
  10. Check “Refresh resources upon completion”
  11. Select “Specific resources”
  12. Click on the “Specify resources” button and select your project's lib directory.
  13. Check “Recursively include sub-folders”
  14. Now go to the build options tab
  15. Check “Allocate Console”
  16. Check “Launch in background”
  17. Check “Run the builder After a Clean”
  18. Check “Run the builder During manual builds”
  19. Check “Run the builder During auto builds”
  20. Check “Specify working set of relevant resources”
  21. Click on “Specify Resources”
  22. Select your project's JNI directory and all files within.
  23. Now click OK on the bottom.

CAVEAT: When setting up paths, be aware that paths with spaces will cause issues. You may wish to use the 8.3 mangled name (e.g “MyDocu~1”) for path elements that need it.

Simple, eh? Have fun.

android/setting_up_ndk_to_build_the_library.1349853519.txt.gz · Last modified: 2012/10/10 07:18 by 127.0.0.1