?
Solved

Code::Blocks

Posted on 2014-07-27
2
Medium Priority
?
375 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 35

Accepted Solution

by:
sarabande earned 2000 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

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…
An Outlet in Cocoa is a persistent reference to a GUI control; it connects a property (a variable) to a control.  For example, it is common to create an Outlet for the text field GUI control and change the text that appears in this field via that Ou…
The goal of this video is to provide viewers with basic examples to understand and use structures in the C programming language.
Video by: Grant
The goal of this video is to provide viewers with basic examples to understand and use nested-loops in the C programming language.
Suggested Courses
Course of the Month13 days, 23 hours left to enroll

800 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