Fwd: NDK related questions

2 views
Skip to first unread message

Makoto Inoue

unread,
Aug 1, 2009, 6:49:53 AM8/1/09
to london...@googlegroups.com
Hi, I am sending same question posted to meetup mailing list.

Hello.

I know there will be NDK related talk this month, but I won't be able
to attend the meetup, so would like to post my problems with NDK now.

The detail is posted at Android NDK google group. I would appreciate
if LAUG members also have a quick look and share your C/C++ knowledge.

http://groups.google.com/group/android-ndk/browse_thread/thread/10f2e02c5d6857cb/2bb674b03ccdf801
http://groups.google.com/group/android-ndk/browse_thread/thread/80f76510d7bf7df8

As a separate note, I am getting annoyed by the fact that NDK support
only limited functionality of C++

# From android-ndk-1.5_r1/docs/STABLE-APIS.TXT
C++ Library:
------------

An *extremely* minimal C++ support API is available. For Android 1.5, this is
currently limited to the following headers:

  <cstddef>
  <new>
  <utility>
  <stl_pair.h>

They may not contain all definitions required by the standard. Notably, support
for C++ exceptions and RTTI is not available with Android 1.5 system images.

The C++ support library (-lstdc++) is automatically linked to your native
modules too, so there is no need to list it through LOCAL_LDLIBS


Rather than compiling C++ using NDK, is it possible to just cross
compile(http://benno.id.au/blog/2007/11/13/android-native-apps), put
the compiled  code under java project, then just call from shell like
below?

String path = "path/to/file/";

       try {
           Runtime.getRuntime().exec("chmod 666 " + path);
       } catch (IOException e) {
           Log.e(TAG, "There was an error trying to change privledges
on a file", e);
       }

Thanks.

Makoto

Reply all
Reply to author
Forward
0 new messages