Tech
[程序员] 记录两个 WIN11 下使用 mingw-make 碰到的离谱环境错误
1. mingw32-make.exe: *** INTERNAL: readdir: Invalid argument
该错误没有找到具体的根因, 只知道解决方案:
修改环境变量, 删除或者将 Microsoft Store 的环境变量移动到最后
2. CreateProcess(xxx.bat, xxx.bat, ...) failed.
mingw32-make.exe 在 WIN11 上执行 gcc 命令的时候, 会将 gcc 命令封装成一个 bat 脚本执行;
当时非常迷惑的原因是:
手动调用 cmd, 并在 cmd 中执行该 bat 脚本, 执行正常, 一旦涉及到使用 Makefile, CreateProcess 这个 API 就会执行失败;
该问题的主要原因是:
WIN11 下的 C:\Windows\SysWOW64 下的 cmd.exe 丢了, 但是 C:\Windows\System32 下的 cmd 还在, AI 给出的解释是 由于 mingw32-make.exe 是 32 位的程序, 会被 windows 加载到 64 位环境下执...
Read the full discussion on V2EX
This article was aggregated from V2EX. Click to join the conversation.
View on V2EX