Android is linux...
On Mar 9, 6:45 pm, "Stone Mirror" <stonemir...@gmail.com> wrote:
> 2008/3/9 Guilherme <guilherm...@gmail.com>:
> > Android is linux...I guess it depends on what you define as usual -- it is a real Linux
> Not in any usual sense: it just uses a Linux kernel.
kernel, with a libc and most other standard Unix libraries as you'd
expect. True, it doesn't include X windows, or GTK, or KDE, but I
think it's a questionable position that those things are required to
call something "Linux."
Heck, the FSF even counts using glibc as meaning you need to call it
"GNU/Linux," so to at least one vocal group of people all you need is
the kernel to call it Linux. :)
Thanks,
Diluka.
Thanks,
Diluka.
Thanks,
Diluka.
Digit 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.m...@gmail.com
> <mailto:erik.m...@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 <sbvillasb...@gmail.com
| sbVB <sbvill...@gmail.com> |
|
显示详细信息
| 3月10日 (2天前) |
|
|
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. |
..... |
On Mon, Mar 10, 2008 at 12:01 PM, Digit <digit....@gmail.com> wrote:
> 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 :-)
I can see the advantage of the VM for third party applications. However, if
one is the actual manufacturer of a licensed Android platform, it seems like
a huge investment to have to rewrite say an already optimized and tuned
application.
In other words, it does not seem very appealing to be required to
re-architect an SDL/Gtk+/fill-in-the-blank application to use the Android
Java UI framework and then somehow re-partition the native code into
libraries that may or may not be easy to combine with JNI.
I can understand the restriction of Java imposed on third party developers,
but I cannot see the benefit for a platform licensee that has an extensive
native code base. I hope such restrictions will go away.
Sean
Of course, they wouldn't run anyway because Android phones don't
(AFAICT) have X. And even if you could you wouldn't want to do that
because they wouldn't integrate with the Android UI and the result would
be utterly horrible.
*Any* application that has a UI will have to have a UI written, and
designed for, Android. And that's almost certainly going to mean Java,
because that's what it's written in.
(It may be possible to wrap up all the JNI needed to call into the
Android UI in, say, a set of C++ classes so that you can write a C++ app
that used it; but it would be a repulsive amount of work and would
probably be extremely brittle... and even then you wouldn't be able to
subclass components, so you'd have to write Java code to receive
callbacks. And, frankly, I don't see the benefit; you'll have to rewrite
your UI to fit the Android framework anyway, so you might as well do it
in the preferred language and save everyone a lot of time.)
--
David Given
d...@cowlark.com
It is, AFAIK, not available... but it's possible to bodge it
sufficiently to work. Whether it will work reliably, or whether it will
*continue* to work with the next release, is another matter. Watch out
for the dragons.
The error reporting on System.LoadLibrary() is poor; if there are any
unresolved symbols in the .so then all you'll get is an
UnresolvedLinkException saying 'File Not Found'. The most common reason
for *that* is because you're referring to C library or C runtime symbols
that don't exist.
If you go to android-developer and look for the 'Unresolved symbols &
JNI' thread you'll see the various hacks I've done. Some of these might
be of use to you.
*Also*, there's a bug in that the shared library loader on Android fails
to load shared libraries correctly under some circumstances. See #599 on
the bug tracker for more information. This kicks in when you try to take
the address of a member of a global structure that's not the first item.
I did mention the dragons, didn't I?
Good luck!
--
┌─── dg@cowlark.com ───── http://www.cowlark.com ─────
│ "I have always wished for my computer to be as easy to use as my
│ telephone; my wish has come true because I can no longer figure out
│ how to use my telephone." --- Bjarne Stroustrup
I am very glad to hear that, please keep your work going and release
it here when you done it, it's meaningful.
--
web: http://www.forwind.cn
msn: likunarmstrong at hotmail.com
Dear PowerGUI
I will be very much interested to use the same , If available
****************************************************************************
****************************************************************************
*************************************
This e-mail and attachments contain confidential information from HUAWEI,
which is intended only for the person or entity whose address is listed
above. Any use of the information contained herein in any way (including,
but not limited to, total or partial disclosure, reproduction, or
dissemination) by persons other than the intended recipient's) is
prohibited. If you receive this e-mail in error, please notify the sender by
phone or email immediately and delete it!