문제

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.
도움이 되었습니까?

해결책 2

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.

다른 팁

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)

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top