34 messages in com.googlegroups.android-internalsRe: [android-internals] Re: native (C...| From | Sent On | Attachments |
|---|---|---|
| sbVB | 09 Mar 2008 17:43 | |
| Stone Mirror | 09 Mar 2008 18:08 | |
| Guilherme | 09 Mar 2008 18:21 | |
| vlad...@gmail.com | 09 Mar 2008 18:37 | |
| Stone Mirror | 09 Mar 2008 18:45 | |
| hackbod | 09 Mar 2008 22:22 | |
| Stone Mirror | 10 Mar 2008 06:05 | |
| Digit | 10 Mar 2008 08:05 | |
| vlad...@gmail.com | 10 Mar 2008 08:25 | |
| Erik Martino | 10 Mar 2008 08:34 | |
| Digit | 10 Mar 2008 08:37 | |
| vlad...@gmail.com | 10 Mar 2008 08:41 | |
| Digit | 10 Mar 2008 08:57 | |
| Diluka Moratuwage | 10 Mar 2008 08:59 | |
| Diluka Moratuwage | 10 Mar 2008 09:01 | |
| Diluka Moratuwage | 10 Mar 2008 09:05 | |
| Digit | 10 Mar 2008 09:07 | |
| Erik Martino | 10 Mar 2008 09:33 | |
| hackbod | 10 Mar 2008 09:43 | |
| Digit | 10 Mar 2008 10:01 | |
| sbVB | 11 Mar 2008 17:22 | |
| vlad...@gmail.com | 11 Mar 2008 17:28 | |
| chen yuefeng | 11 Mar 2008 19:07 | |
| Sean Kelley | 04 Apr 2008 05:11 | |
| David Given | 04 Apr 2008 10:28 | |
| Digit | 04 Apr 2008 15:20 | |
| Akio | 05 Apr 2008 01:02 | |
| David Given | 05 Apr 2008 10:42 | |
| Akio | 09 Apr 2008 05:26 | |
| sbVB | 15 Apr 2008 06:27 | |
| PowerGUI | 16 Apr 2008 16:42 | |
| windstorm | 16 Apr 2008 21:23 | |
| sbVB | 17 Apr 2008 06:32 | |
| Valluri Kumar | 21 Apr 2008 20:50 |
| Subject: | Re: [android-internals] Re: native (C++) SDK for Android is definitively needed![]() |
|---|---|
| From: | Digit (digi...@gmail.com) |
| Date: | 03/10/2008 10:01:18 AM |
| List: | com.googlegroups.android-internals |
we don't want to keep everything in the VM. we, the Android team, are *very* practical animals. we know that all languages/runtime suck at certain things. our choice of Java stems from practical considerations more than anything else, and we really don't have a religion for it. it has benefits and annoyances.
let's just say that for what we want to provide, an initial Java path is the one that sucks less :-)
On Mon, Mar 10, 2008 at 5:34 PM, Erik Martino <erik...@gmail.com> wrote:
It is true that compiling C to Dalvik is not generally feasaible. However you you can come really close with a slightly restricted language like this one
http://en.wikipedia.org/wiki/Cyclone_programming_language
Cyclone uses tricks ("Fat" pointers) to make pointer arithmetics safe. It is not completely general, but may get you 95% of the way.
If you want a completely generel C with full pointer arithmatics and everything there is of course NestedVM which basically compiles C into a MIPS binary and translates the MIPS binary into Java byte codes where the memory segments is represented by arrays. It is of course slow, ~factor 10.
If you really want native access there are other phone platforms that probably is more attractive like the iphone. The whole point of android, in my view, is to keep as much as possible in the vm.
On Mar 10, 4:58 pm, Digit <digi...@gmail.com> wrote:
Dalvik respects some of the JVM's memory semantics. you cannot perform raw-pointer accesses with it for example. this means that compiling C/C++ to it is not generally feasible.
but you can envision writing C/C++ code that is called through JNI (useful for a lot of CPU-intensive stuff, while the App UI is still in Java and can use many Java services). and in Android, such a program crashing would only bring down its process, not the whole system.
On Mon, Mar 10, 2008 at 4:34 PM, Erik Martino <erik...@gmail.com> wrote:
Another solution would be to create a C/C++ compiler that targets the dalvik VM. Then you would have tonnes of code ready to use that would still be platform independent and doesn't bring the phone down when it crashes.
On Mar 10, 1:43 am, sbVB <sbvi...@gmail.com> wrote:
Hi, all
For many reasons, Android MUST have a C/C++ SDK. For instance: I have countess lines of code written in C++ and wxWidgets; of course, I want to compile this to Android. Don't tell me Java is better. I'm focusing in reusing my code.
I've spent many hours digging out the web, finding "hacker-like" recipes to use native code on Android, as well as my own hours of experimentation. But that's not the way it should be.
For the sake of Android, the Google development team must provide a complete C/C++ SDK for Android, much similar of the one found in Linux. Development tools such as g++, make, ldconfig, ar, etc. should be included in this C/C++ SDK for Android.
If Google does not provide this C/C++ SDK, Android might get discredited.




