yagoub
April 15, 2015, 3:35pm
#21
Sorry @iQD , but Now i have this error
[armeabi] Compile++ thumb: cocostudio_static <= WidgetReader.cpp
make: execvp: /DEV/android-ndk-r10d-darwin-x86_64/android-ndk-r10d/toolchains/llvm-3.5/prebuilt/darwin-x86_64/bin/clang++: Permission denied
make: *** [obj/local/armeabi/objs-debug/cocostudio_static/WidgetReader/WidgetReader.o] Error 127
make: *** Waiting for unfinished jobs....
make: Leaving directory `MyProjects/MyGame/proj.android'
my Application.mk file :
APP_ABI := armeabi
NDK_TOOLCHAIN := arm-linux-androideabi-clang3.5
APP_STL := c++_static
APP_CPPFLAGS := -frtti -DCC_ENABLE_CHIPMUNK_INTEGRATION=1 -std=c++11 -fsigned-char -arch arm
APP_LDFLAGS := -latomic
ifeq ($(NDK_DEBUG),1)
APP_CPPFLAGS += -DCOCOS2D_DEBUG=1
APP_OPTIM := debug
else
APP_CPPFLAGS += -DNDEBUG
APP_OPTIM := release
endif
Thanks alot for your help.
iQD
April 15, 2015, 3:44pm
#22
Make a clean build by also deleting your obj folder, and make sure there is no make/compile process left from prior builds accessing the obj folder.
yagoub
April 16, 2015, 8:12am
#23
it doesn’t work, all time i have this error:
[armeabi] Compile++ thumb: cocostudio_static <= WidgetReader.cpp
make: execvp: /DEV/android-ndk-r10d-darwin-x86_64/android-ndk-r10d/toolchains/llvm-3.5/prebuilt/darwin-x86_64/bin/clang++: Permission denied
make: *** [obj/local/armeabi/objs-debug/cocostudio_static/WidgetReader/WidgetReader.o] Error 127
make: *** Waiting for unfinished jobs....
make: Leaving directory `MyProjects/MyGame/proj.android'
@ricardo @slackmoehrle @zhangxm @hhyytt could you help us please ?
iQD
April 16, 2015, 9:32am
#24
Is your virus scanner blocking the execution of clang++?
Did you set the executable flag on the file?
yagoub
April 16, 2015, 9:40am
#25
i don’t have an antivirus.
yagoub
April 16, 2015, 10:26am
#26
@iQD , i’m using the NDK r10D 64bits, should I compile using NDK r10c 32bits ?
iQD
April 16, 2015, 10:46am
#27
You should
Then check if clang++ has the executable flag set. The error is saying, that it’s not set.
You can go for 32Bit, as this is what Google recommends.
permission denied
seems a bit odd, just to be sure, you have read/write permissions to your directory you are building in?
yagoub
April 16, 2015, 12:53pm
#29
Thanks, i have downloaded the NDK r10d 32bits, , and it works fine now
i followed this procedure( from google website ) :
1-Download the appropriate package (NDK r10d 32bits).
2-Open a terminal window.
3-Go to the directory to which you downloaded the package.
4-Run chmod a+x on the downloaded package.
5-Execute the package. For example:
ndk$ chmod a+x android-ndk-r10d-darwin-x86.bin
ndk$ ./android-ndk-r10d-darwin-x86.bin
umai
July 16, 2015, 1:11am
#30
I just ran into this issue as well. What is the fix really? to_string is not supported by Android? It always worked when compiling for iOS/Mac.
yagoub
July 16, 2015, 8:44am
#31
i have created a header file
#ifndef Templates_h
#define Templates_h
#include <string>
#include <sstream>
using namespace std;
namespace std
{
template < typename T > std::string to_string( const T& n )
{
std::ostringstream stm ;
stm << n ;
return stm.str() ;
}
}
#endif
And each time when i need to to_string
, i include it.
Change your Application.mk
like this
APP_ABI := armeabi
NDK_TOOLCHAIN := arm-linux-androideabi-clang3.5
NDK_TOOLCHAIN_VERSION=4.9
APP_STL := c++_static
APP_CPPFLAGS := -frtti -DCC_ENABLE_CHIPMUNK_INTEGRATION=1 -std=c++11 -fsigned-char -arch arm
APP_LDFLAGS := -latomic
ifeq ($(NDK_DEBUG),1)
APP_CPPFLAGS += -DCOCOS2D_DEBUG=1
APP_OPTIM := debug
else
APP_CPPFLAGS += -DNDEBUG
APP_OPTIM := release
endif
2 Likes
Same here. I saw a stackoverflow discussion about a compiler bug using a certain version of the compiler.
Anyway @yagoub gave a good solution