Author Topic: Build error: Execution of 'mingw32-g++.exe failed  (Read 43011 times)

Offline dinosaurgirl

  • Single posting newcomer
  • *
  • Posts: 2
Build error: Execution of 'mingw32-g++.exe failed
« on: November 24, 2013, 04:36:05 am »
Hi there,

I know people on the forum have already asked about this error but I tried following all the solutions and none seem to work.

I installed the minGW compiler package on my laptop because CodeBlocks would always complain that it couldn't find my old GCC compiler. Now it doesn't complain about that anymore, but whenever I try to build and run a file, it keeps popping up a box saying that the file hasn't been build yet and asking if I want to build it now. If I click yes, it keeps popping up the same dialog ox until I click no or cancel. It also gives me the following error:

Code
Execution of 'mingw32-g.exe  -o "C:\Users\Anastasiya\Google Drive\assignment.exe" "C:\Users\Anastasiya\Google Drive\assignment.o"' in 'C:\ProgramData\Microsoft\Windows\Start Menu\Programs\CodeBlocks' failed.

Things I tried doing so far:
- reinstalling CodeBlocks
- checked the path for the compiler, it is correct (C:\MinGW). I did not rename the folder containing the compiler.
- tried changing the linker for dynamic libs from mingw32-g++.exe to mingw32-g.exe  (the original one would cause the same error as above, except for the execution of mingw32-g++.exe would fail).
- tried manually changing the compiler path
- made sure there are no spaces/weird characters in my path or filenames


Please help me out, I really don't know what to do.
Thanks! :)

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7679
    • My Best Post
Re: Build error: Execution of 'mingw32-g++.exe failed
« Reply #1 on: November 24, 2013, 06:34:05 am »
Try moving your project and source files to a more normal location.
this location 'C:\ProgramData\Microsoft\Windows\Start Menu\Programs\CodeBlocks' is not a good one.
Note: Based on the build log I am not sure the path above is where the sources files/project files are located or the working folder location.
I do NOT have time to look it up tonight. And, likely will forget by morning.

Tim S.
« Last Edit: November 24, 2013, 06:36:24 am by stahta01 »
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 BlueHazzard

  • Developer
  • Lives here!
  • *****
  • Posts: 3353
Re: Build error: Execution of 'mingw32-g++.exe failed
« Reply #2 on: November 24, 2013, 03:37:38 pm »
this error can have various sources and it is quite hard to find the proper solution. Some hints:
* Check the settings in: Settings->Compiler->toolchain executables
* Check if you can run the command from a command line
* Check if you have access/write permission on any folder/file used in your build process

greetings

Offline dinosaurgirl

  • Single posting newcomer
  • *
  • Posts: 2
Re: Build error: Execution of 'mingw32-g++.exe failed
« Reply #3 on: November 24, 2013, 04:37:19 pm »
stahta01: Thanks so much! How did I not think of this before? As soon as I moved the file to my Desktop everything worked.

BlueHazzard: Thanks for your advice as well! Trying to run stuff from the command line is definitely worth a try if something like this happens again.