Android: Difference between revisions

Jump to navigation Jump to search
1,075 bytes added ,  15 December 2009
→‎Building: Add section about fixing headers
(Add quickstart section for setting up on Linux)
(→‎Building: Add section about fixing headers)
Line 51: Line 51:


=== Building ===
=== Building ===
==== Fix headers ====
Certain header files in the NDK do not compile as C++. Paste this command in your terminal while in the NDK directory to patch them.
patch -p1 << "EOF"
--- tmp/android-ndk-1.6_r1/build/platforms/android-4/arch-arm/usr/include/asm-generic/siginfo.h  2009-07-28 17:26:01.000000000 -0700
+++ android-ndk-1.6_r1/build/platforms/android-4/arch-arm/usr/include/asm-generic/siginfo.h      2009-12-09 11:48:46.000000000 -0800
@@ -55,7 +55,7 @@
  struct {
  timer_t _tid;
  int _overrun;
- char _pad[sizeof( __ARCH_SI_UID_T) - sizeof(int)];
+ //char _pad[sizeof( __ARCH_SI_UID_T) - sizeof(int)];
  sigval_t _sigval;
  int _sys_private;
  } _timer;
--- tmp/android-ndk-1.6_r1/build/platforms/android-4/arch-arm/usr/include/dlfcn.h 2009-07-28 17:26:01.000000000 -0700
+++ android-ndk-1.6_r1/build/platforms/android-4/arch-arm/usr/include/dlfcn.h    2009-12-09 11:51:20.000000000 -0800
@@ -42,7 +42,7 @@
    RTLD_LAZY = 1,
    RTLD_LOCAL  = 0,
-  RTLD_GLOBAL = 2,
+  RTLD_GLOBAL = 2
  };
  #define RTLD_DEFAULT  ((void*) 0xffffffff)
EOF


==== Full Build ====
==== Full Build ====
134

edits

Navigation menu