Need c99 implementation

15 views
Skip to first unread message

Mike Gassman

unread,
Nov 4, 2009, 6:12:41 PM11/4/09
to android-ndk
Hey I'm a student currently enrolled in an OpenGL class and for
practice, I am porting some of my projects over the the android.

I run into compiler errors due to my complier using a different
dialect of the C programming language, such as not being able to
declare and initialize a variable in a for loop.

How would I be able to build applications with the NDK using the C99
implementation?

I'm guessing it could be a setting within the GCC compiler or maybe I
could modify a makefile in the NDK...

Thanks for any help!

Mike Gassman

unread,
Nov 5, 2009, 10:38:00 PM11/5/09
to android-ndk
Hmm, after looking into it more, it seems like it was because I was
using C++ only syntax and I was compiling a .c file.

I tried changing the .c file to a .cpp and I'm still having an issue.

Now the compiler is saying "No rule to make target 'apps/test3d/jni/
app-android.c' even though I renamed the app-android.c file to app-
android.cpp.

I can't seem to find a solution.

Rohit Grover

unread,
Nov 5, 2009, 11:34:57 PM11/5/09
to andro...@googlegroups.com
Did you remember to update your Android.mk with the updated .cpp filename?
> --
>
> You received this message because you are subscribed to the Google Groups "android-ndk" group.
> To post to this group, send email to andro...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/android-ndk?hl=en.
>
>
>

Mike Gassman

unread,
Nov 6, 2009, 5:37:34 PM11/6/09
to android-ndk
Yes I did, and it is still showing up that the compiler is looking for
a .c file...

Still haven't been able to solve the issue.

P.S. Just got my Android phone today. A Motorola Droid!

On Nov 5, 11:34 pm, Rohit Grover <rgrov...@gmail.com> wrote:
> Did you remember to update your Android.mk with the updated .cpp filename?
>

Nicholas FitzRoy-Dale

unread,
Nov 6, 2009, 7:27:10 PM11/6/09
to andro...@googlegroups.com

On 07/11/2009, at 9:37 AM, Mike Gassman wrote:

> Yes I did, and it is still showing up that the compiler is looking for
> a .c file...
>
> Still haven't been able to solve the issue.

I've encountered stale dependency problems after moving files around,
and solved them by deleting out/apps/yourappname. Might help.

Nicholas

Mike Gassman

unread,
Nov 6, 2009, 9:20:23 PM11/6/09
to android-ndk
Thanks Nick!

That was exactly the issue... I can't believe that held up my
development for 3 days or so.

I should be able to figure it out from here.

Thanks again!

On Nov 6, 7:27 pm, Nicholas FitzRoy-Dale
Reply all
Reply to author
Forward
0 new messages