First, thanks for the work you have done on porting objective-c to
android.
I just patched and compiled gcc with objc support. I wrote a
HelloWorld.m and compiled it for Android (hooray !). I just had to add
"-x objective-c" to LOCAL_CFLAGS in my Android.mk and rename
HelloWorld.m in HelloWorld.c
Now, I'm trying to compile a real life project (GNUStep base lib, that
includes Foundation). I was wondering if you already dug into the
android-ndk makefiles to recognize .m extensions and compile them
using "-x objective-c" ?
I have actually been working on a slightly more Apple-esque version of foundation than GNUStep (and more impressively UIKit with a JNI based encapsulation). But to your question no I have not been altering the android .mk files, as a matter of fact I have been avoiding them in lieu of working entirely in Xcode. The GCC target should detect .m versus .c by default, however that does not eliminate the need for -lobjc (since that is a requirement for binding to the runtime as a library and not part of the actual language).
Im very glad that the patch works as expected. Right now I am working on some other projects for a bit, but I will be returning to my internal builds of the Foundation/UIKit shortly which will most likely spur some more commits into the compiler code-base.
Have you had a chance to test any further other than just HelloWorld type stuff?
OK, I'm a XCode beginner and I really don't know how to start to
create an empty project and "change" the compiler using XCode. I will
ask Google.
> Im very glad that the patch works as expected. Right now I am working on some other projects for a bit, but I will be returning to my internal builds of the Foundation/UIKit shortly which will most likely spur some more commits into the compiler code-base.
>
Great news !
> Have you had a chance to test any further other than just HelloWorld type stuff?
>
Not yet. My first goal is to port some iPhone applications (95%
OpenGL) to Android with the minimum of code modification (I think of
activity creation, touch events, etc...).
--
Maxime Biais
Ok, I just patched android-ndk/build/core/definitions.mk and
android-ndk/build/core/build-binary.mk to make it works with .m files.
--
Maxime Biais