When I used MinGW to compile a C++ project under Windows today, I encountered an error in cc1plus.exe:
- cc1plus . exe : out of memory allocating 352885 bytes
At the same time, it is observed that the memory usage is very exaggerated, and each cc1plus.exe process almost eats more than 1G of memory.
The solution given on Stackoverflow was to convert the UTF-16 encoded file in the project to UTF-8, but it did not work.
After Google again, I found that https://github.com/CoolProp/CoolProp/issues/608 gave the perfect solution:
I think you need to upgrade your MINGW. I just tried to build the static library with MINGW on my machine and I got the below output. I just installed the TDM-GCC installation 4.9.4
That is to say, just change the compiler from MinGW to the latest TDM-GCC.
The MinGW project itself has not been maintained for several years, and the GCC version stays at 4.8.1.
In fact, there is also a GNU porting project called Mingw64. The relationship between the three is:
MinGW is only 32 bits, http://www.mingw.org/
Mingw64 has 32-bit and 64-bit: i686-w64-mingw32 and x86_64-w64-mingw32
TDM-GCC seems to be a package of Mingw64, which installs both 32-bit and 64-bit by default.
In addition, JetBrains CLion 1.1.1 supports TDM-GCC, only need to be set in ToolChain:
- Python error: Unable to find vcvarsall.bat [How to Solve]
- [Solved] Go Gcc Compilation Error: gcc.exe fatal error no input files compilation terminated
- Go error reported unimplemented: 64 bit mode not compiled in and MinGW 64 bit installation error res resolved
- Installing mingw64 and msys2 in win10
- codeblocks17.12 debug :ERROR: You need to specify a debugger program in the debuggers’s set…
- The solution of Python extension problem “unable to find vcvarsall. Bat”
- Eclipse C/C++ Error: launch failed,binary not found
- Cannot find bounds of current function
- Importerror: DLL load failed: the specified module was not found. Solution
- [Solved] Git pull fatal: refusing to merge unrelated histories