Author Topic: Giving Help: Execution of 'mingw32-g++.exe...' failed.  (Read 7650 times)

Offline Art in Music

  • Single posting newcomer
  • *
  • Posts: 7
Giving Help: Execution of 'mingw32-g++.exe...' failed.
« on: February 07, 2014, 12:44:59 am »
Hi,

I was having an issue building code after installing Code::Blocks, then MinGW. I was unable to build anything with it. Instead, when I tried to build something in C::B, it gave me this error: Execution of 'mingw32-g++.exe -Wall -fexceptions -g  -c "C:\Program Files (x86)\CodeBlocks\programs\Testing\main.cpp" -o obj\Debug\main.o' in 'C:\Program Files (x86)\CodeBlocks\programs\Testing' failed.

I had all my settings right in Code::Blocks, nothing had been changed from default, and I'd gone with the default installations for both C::B and MinGW, so I decided to check for the mingw32-g++.exe file that it said it couldn't execute in the Bin folder Code::Blocks said it referred to, which had been auto-detected to contain the MinGW installation. That file was not there. Turns out the basic installation from the mingw-get-setup.exe (as of now) does not include the C++ compiler. So, all you have to do is run that executable again, and choose "Run Now" when it detects your existing installation. Then, select the C++ compiler download in the list, apply changes, and it'll install that in half a heart beat. That is the only necessary step I took to fix this issue.

Perhaps Code::Blocks could be designed to run a check for the specific *.exe files it requests to accurately identify the issue?

Thank you,
Dylan

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7592
    • My Best Post
Re: Giving Help: Execution of 'mingw32-g++.exe...' failed.
« Reply #1 on: February 07, 2014, 03:34:14 am »
Won't help the average newbie.

Tim S.
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline Vuki

  • Multiple posting newcomer
  • *
  • Posts: 41
Re: Giving Help: Execution of 'mingw32-g++.exe...' failed.
« Reply #2 on: February 07, 2014, 09:18:14 am »
Do not create projects in Program Files, especially on Windows 7/8. Create a dedicated directory somewhere outside system folders, such as C:\Projects, preferably without spaces in names. If this does not help, please post full compilation log, you didn't provide enough information to guess where the problem is.

Offline Art in Music

  • Single posting newcomer
  • *
  • Posts: 7
Re: Giving Help: Execution of 'mingw32-g++.exe...' failed.
« Reply #3 on: February 07, 2014, 07:38:12 pm »
Yes, I have directed my projects to C:\CBProjects