Code::Blocks Forums

User forums => Using Code::Blocks => Topic started by: dinosaurgirl on November 24, 2013, 04:36:05 am

Title: Build error: Execution of 'mingw32-g++.exe failed
Post by: dinosaurgirl 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! :)
Title: Re: Build error: Execution of 'mingw32-g++.exe failed
Post by: stahta01 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.
Title: Re: Build error: Execution of 'mingw32-g++.exe failed
Post by: BlueHazzard 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
Title: Re: Build error: Execution of 'mingw32-g++.exe failed
Post by: dinosaurgirl 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.