Solved

Code::Blocks

Posted on 2014-07-27
2
365 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 34

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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Windows programmers of the C/C++ variety, how many of you realise that since Window 9x Microsoft has been lying to you about what constitutes Unicode (http://en.wikipedia.org/wiki/Unicode)? They will have you believe that Unicode requires you to use…
Examines three attack vectors, specifically, the different types of malware used in malicious attacks, web application attacks, and finally, network based attacks.  Concludes by examining the means of securing and protecting critical systems and inf…
The goal of this video is to provide viewers with basic examples to understand how to use strings and some functions related to them in the C programming language.
The goal of this video is to provide viewers with basic examples to understand and use conditional statements in the C programming language.

717 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