1
votes

I have started programming in C++ about a month ago. One of my friends provided me with a software named "Gcc and Jfe", which is an IDE+ gcc 2.95 compiler punched together. I used to program in C and C++ using that software and my experience with it was also quite good. It was very neat and clean and all.

But recently I have been notified that using MinGW with Eclipse provides better experience(as I have always used eclipse for java programming and it is by far the best IDE I have ever used). So I installed MinGW and edited the environment path variable. After that whenever I try to give the command : "gcc --version". It replies with : "Could not execute gcc using C\gcc\bin\g++.exe this means that gcc has probably been moved or deleted, please reinstall it."

This gcc folder was the place where my gcc-jfe sofware was installed, there was no uninstaller in that package so I had to delete the whole folder to remove it from my PC. I have also checked the path variable, there isn't anything like ";C\gcc\bin". My path variable is :

%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;C:\Program Files\Microsoft SQL Server\100\Tools\Binn\;C:\Program Files\Microsoft SQL Server\100\DTS\Binn\;C:\Program Files\Java\jdk1.7.0_25\bin;C:\MinGW\bin

But when I am giving the command : "g++ --version". It replies with the version name 4.6.2 etc etc. I can also compile programs with g++ command. So the problem is that I cannot use the command "gcc" at all(g++ is working fine as it should). Every time it gives the same reply "Could not execute gcc using C\gcc\bin\g++.exe this means that gcc has probably been moved or deleted, please reinstall it." . I haven't tried MinGW with eclipse yet. I just want to clear this mess out as soon as possible. Someone please help me solve this problem. Thanks in advance.

1
Paragraphs would help a bit, that blob is extremely hard to read.Mat

1 Answers

1
votes

to test try following:

  • a.)
  • open windows cmd
  • cd to c:\mingw\bin
  • type : gcc.exe --version
  • b.)
  • type : SET PATH=c:\mingw\bin
  • test : type : PATH Output should be only PATH=c:\mingw\bin
  • type : gcc.exe --version

if error : Could not execute gcc using C\gcc\bin\g++.exe ....

  • move gcc.exe in c:\ming\bin to a backup folder

from Jens' File Editor/GCC

To install the program at home, simply run the downloaded file. This will expand an archive to c:\gcc by default. It will then create a link on your desktop and in your Start menu called "gcc."

  • Look for gcc on your desktop
  • throughout the system, search for the file gcc.exe;gcc.bat
  • move all found files to a backup folder (except the file c:\ming\bin\gcc.exe)
  • reinstall mingw