News:

The new Release 25.03 is out! You can download binaries for Windows and many major Linux distros here .

Main Menu

can not open output file

Started by mrwigglesworth, June 04, 2018, 05:10:20 AM

Previous topic - Next topic

mrwigglesworth

Hello everyone.  I am rather new to programming.

I have been using learncpp.com to learn coding, and downloaded the code::blocks IDE.
Everything was going fine until I was learning to debug.  I was learning about the call stack and ran a code segment provided by the
site.  All was fine and dandy until I erased the code and attempted to run another segment.  I turned off the debugger and pasted the
new code and when I attempted to build I ran into an error.

In the build messages in the log window, under file it is 1d.exe, and the error associated was

cannot open output file bin\debug\testcode.exe  Permission denied
error: 1d returned 1 exit status.

In the build log it stated

C:/TDM-GCC-64/bin/../lib/gcc/x86_64-w64-mingw32/5.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot open output file bin\Debug\TestCode.exe: Permission denied
collect2.exe: error: ld returned 1 exit status


What did I do?

I can not even erase the file to begin again because it is stating a file is in use by another program

oBFusCATed

Open task manager and search for it or look for gdb.exe. When you find it, just kill the app and try to build again.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

BlueHazzard

What version of codeblocks are you using?
Try a nightly if this error keeps popping up...

mrwigglesworth

@oBFusCATed

thank you, that did the trick.  I lost that one project because I missed your reply.  I ran into the same issue with another debugging and
your suggestion resolved the issue.  Thank you for your time.

@BlueHazzard
17.12
Thank you for helping.

oBFusCATed

Can you try to find a way to reproduce the problem reliably?
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]