arm-linux-androideabi-g++.exe: CreateProcess: 没有这样的文件或目录错误

发布于 2024-12-08 06:44:22 字数 269 浏览 1 评论 0原文

我刚刚在“android.mk”项目文件中添加了一些新语句来编译新的源代码文件,但在编译所有 *.cpp 文件后出现错误:

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

其他人也有类似的错误吗?我不明白为什么会发生这种情况,我没有修改路径,只是添加了源代码文件。

提前致谢。

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.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

ぃ双果 2024-12-15 06:44:22

对于 cygwin 来说,命令行可能太长(请参见此处:如何在 Android/Linux 上构建 OpenSSL ?)

尝试将所有东西移动到路径较短的地方。我只是在将几个文件添加到 android.mk 文件后出现错误,并暂时将 android 项目移动到 /cygdrive/c/projects 等位置以允许其构建。我只是在那里建了它,然后把所有东西都搬回来了。

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.

别忘他 2024-12-15 06:44:22

传递给 CreateProcess() 的命令行字符串的最大长度为 32,768 个字符。长度包括所有参数。
顺便说一句,Android NDK 构建系统可能会生成超过 32,768 个字符的命令行,因为源文件的完整路径太长,并且源文件的数量太大,因此目标文件路径又长又多。链接时所有完整路径都会添加到命令行。
我通过将项目文件夹放在 Windows 文件系统的根目录并将其重命名为一个字母(如“C:\E”)来解决此问题,以便所有路径都比以前更短。

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.

我不咬妳我踢妳 2024-12-15 06:44:22

此问题可能是由于构建 PC 上的内存不足造成的。
我最近在虚拟 Windows XP SP3 32 位上遇到了同样的问题 - 在链接阶段,系统尝试消耗最多 2.6 GB 内存,而限制设置为 2.2 GB,并且没有足够的可用空间在磁盘上分配所需的交换文件...

This issue is probably caused by the insuffient memory on the build PC.
I've ran recently into the same issue on virtual Windows XP SP3 32-bit - during the linking phase the system tried to consume up to 2.6 GB of memory, while the limit was set at 2.2 GB, and there was not enough free space on the disk to allocate the needed swap file...

倒数 2024-12-15 06:44:22

我和你有同样的错误。使用新系统(虚拟机上的 Windows 等),重试。
这可能是由其他软件冲突引起的,也可能是您操作系统上的工具太多造成的。

I had the same error like you. Use a new system (Windows on a VM etc.), try again.
It is likely to be caused by other software conflict, maybe too many tools on your OS.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文