gadget
unread,Mar 20, 2013, 9:28:58 PM3/20/13Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to andro...@googlegroups.com
I'm getting a strange error when compiling some code (using ndk-r8b) that uses a call to div(size_t, size_t). Here it is:
error: call of overloaded 'div(size_t&, size_t&)' is ambiguous
whatever.cpp:126:55: note: candidates are:
/Developer/Android/android-ndk-r8b/platforms/android-9/arch-arm/usr/include/stdlib.h:150:16: note: div_t div(int, int)
/Developer/Android/android-ndk-r8b/sources/cxx-stl/gnu-libstdc++/4.6/include/cstdlib:142:3: note: ldiv_t std::div(long int, long int)
Changing the offending call to std::div does not help. The problem appears to be that both stdlib.h and cstdlib are being included by parts of the code, independently of each other. The project is compiled with APP_STL := gnustl_static.
I was wondering what would be the best way of dealing with this?