G++ Not found, I've already tried 3 different compilers

霸气de小男生 提交于 2019-12-12 22:30:29

问题


I can compile C code no problem using MinGW but for some reason I can't compile C++. I already tried other compilers, cygnus and cygwin. I'm using JGrasp. Here's the error feed:

 ----jGRASP wedge2 error: command "g++" not found.
 ----   This command must be in the current working directory
 ----   or on the current PATH to use this function.
 ----   PATH is ";C:\Program Files\Common Files\Microsoft Shared\Windows Live;
                 C:\Program Files (x86)\Common Files\Microsoft Shared\Windows Live 
                 C:\windows\system32;
                 C:\windows;C:\windows\System32\Wbem;
                 C:\windows\System32\WindowsPowerShell\v1.0\;
                 C:\Program Files (x86)\Windows Live\Shared; 
                 C:\mingw\bin;  
                 C:\cygnus\cygwin-b20\H-i586-cygwin32\bin; 
                 C:\cygwin\bin;".
 ----jGRASP: operation complete.

回答1:


As I instructed in the comments, you need to install g++ with the MinGW installer. By default, MinGW only installs the C compiler.

To get g++, tick a checkbox during installation.




回答2:


You also can use mingw-get commandline installer: mingw-get install g++

It can be useful to execute mingw-get update before.

Documentation: http://www.mingw.org/wiki/Getting_Started (section Command Line Interface Installer)



来源:https://stackoverflow.com/questions/15795864/g-not-found-ive-already-tried-3-different-compilers

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!