Solved

Code::Blocks

Posted on 2014-07-27
2
347 Views
Last Modified: 2014-08-01
When I try to build a simple c program I get the error.  How do I fix this?

mingw32-gcc.exe   -c "C:\Users\R\Documents\Test\Exercise 1.c" -o "C:\Users\R\Documents\Test\Exercise 1.o"
mingw32-g++.exe  -o "C:\Users\R\Documents\Test\Exercise 1.exe" "C:\Users\R\Documents\Test\Exercise 1.o"  
Execution of 'mingw32-g++.exe  -o "C:\Users\R\Documents\Test\Exercise 1.exe" "C:\Users\R\Documents\Test\Exercise 1.o"' in 'C:\Users\R\Documents\Test' failed.
Checking for existence: C:\Users\R\Documents\Test\Exercise 1.exe
0
Comment
Question by:Ray Turner
2 Comments
 
LVL 32

Accepted Solution

by:
sarabande earned 500 total points
ID: 40224253
it is not quite clear why you are switching from gcc (c and c++ compiler and linker) to g++ (c++ compiler and linker). though both are mostly invoking the same tools there are some differences:

stackoverflow.com/questions/172587/what-is-the-difference-between-g-and-gcc

generally I would recommend to using either gcc or g++ in a command window where the mingw environment already properly is installed and where you could use gcc/g++ commands instead of calling the mingw exe files. check your mingw tools in start menu for such a command window. or better, use the ide that probably came with your mingw setup and which would make your life happier.

the error messages of a compiler/linker should be taken literally. so the linker failed when checking for the existence of the exe file. it also could be that the exe file was (write-)protected somehow (for example when the program still runs). check for existence of the file and whether you could access (delete) it from windows explorer. if windows complains when you delete or execute the file, you may check whether the program is still running or whether the file attributes show a write-projection (perhaps added by version management). if another process accessed the file you may log-out from your account to get the issue solved.

if nothing helped, you may think of renaming the name "Exercise 1" to not containing a space character any more. though that shouldn't be  a stopper for a newer compiler, it might be that some additional tool has problems with that.

Sara
0
 

Author Closing Comment

by:Ray Turner
ID: 40233877
Thanks!
0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Have you thought about creating an iPhone application (app), but didn't even know where to get started? Here's how: ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ Important pre-programming comments: I’ve never tri…
This tutorial is posted by Aaron Wojnowski, administrator at SDKExpert.net.  To view more iPhone tutorials, visit www.sdkexpert.net. This is a very simple tutorial on finding the user's current location easily. In this tutorial, you will learn ho…
The goal of this video is to provide viewers with basic examples to understand and use pointers in the C programming language.
The goal of this video is to provide viewers with basic examples to understand recursion in the C programming language.

758 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now