Force ndk-build to use c++ compiler Optionen

644 views
Skip to first unread message

M J

unread,
Jan 20, 2012, 11:00:22 AM1/20/12
to android-ndk
Hey guys,
I have another problem. I want to compile all my files (*.c and
*.cpp)
with a c++ compiler. How can I tell ndk-build to do that? Currently
it
decides to use a normal c-compiler to compile *.c files and a c++-
compiler to compile *.cpp files.

(I first posted this in android-developer:
http://groups.google.com/group/android-developers/browse_thread/thread/95d0c30b8a00f93d)

David Turner

unread,
Jan 21, 2012, 5:24:01 AM1/21/12
to andro...@googlegroups.com
I don't think this is supported. File a feature request for it on b.android.com and I might consider it in the future. One simple thing would be to put .c in the definition of LOCAL_CPP_EXTENSION, and ensure that the build system uses the C++ compiler when this is the case (it very probably doesn't work right now though).


--
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.
To unsubscribe from this group, send email to android-ndk...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/android-ndk?hl=en.


M J

unread,
Jan 21, 2012, 11:07:19 AM1/21/12
to android-ndk
Thank you, that works ;)

On 21 Jan., 11:24, David Turner <di...@android.com> wrote:
> I don't think this is supported. File a feature request for it on
> b.android.com and I might consider it in the future. One simple thing would
> be to put .c in the definition of LOCAL_CPP_EXTENSION, and ensure that the
> build system uses the C++ compiler when this is the case (it very probably
> doesn't work right now though).
>
>
>
>
>
>
>
> On Fri, Jan 20, 2012 at 5:00 PM, M J <fakeacc...@googlemail.com> wrote:
> > Hey guys,
> > I have another problem. I want to compile all my files (*.c and
> > *.cpp)
> > with a c++ compiler. How can I tell ndk-build to do that? Currently
> > it
> > decides to use a normal c-compiler to compile *.c files and a c++-
> > compiler to compile *.cpp files.
>
> > (I first posted this in android-developer:
>
> >http://groups.google.com/group/android-developers/browse_thread/threa...
> > )
Reply all
Reply to author
Forward
0 new messages