Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

arm-linux-androideabi-g++.exe: CreateProcess: No such file or directory error

I just added a few new statements to my 'android.mk' project file to compile new source code files and I'm having the error after compiling all the *.cpp files:

arm-linux-androideabi-g++.exe: CreateProcess: No such file or directory
make: *** [/cygdrive/...] Error 1

Do anyone else has had a similar error ? I can't figure out why this happens, I didn't modified paths, just added source code files.

Thanks in advance.

like image 872
agsalcedo Avatar asked Dec 21 '22 08:12

agsalcedo


2 Answers

It could be that the command line is too long for cygwin (see here: How to build OpenSSL on Android/Linux ?)

Try moving everything to somewhere with a shorter path. I just had the error after adding a couple of files to the android.mk file, and temporarily moving the android project to somewhere like /cygdrive/c/projects allowed it to build. I just built it there then moved everything back afterwards.

like image 106
Andrew Porritt Avatar answered Dec 28 '22 11:12

Andrew Porritt


The maximum length of the command line string passed to CreateProcess() is 32,768 characters. The length includes all the arguments.
Incidentally, the Android NDK build system may generate a command line longer than 32,768 characters because the full paths of your source files are too long and the number of source files is too large and the object file paths are thus too long and many. All the full paths are added to the command line when linking.
I solved this problem by placing the project folder at the root of the Windows file system and renaming it to one letter like "C:\E" so that all the paths got shorter than before.

like image 35
DuncanSungWKim Avatar answered Dec 28 '22 11:12

DuncanSungWKim