Code::Blocks

User forums => Help => Topic started by: mrwigglesworth on June 04, 2018, 05:10:20 am

Title: can not open output file
Post by: mrwigglesworth on June 04, 2018, 05:10:20 am
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
Title: Re: can not open output file
Post by: oBFusCATed on June 04, 2018, 08:57:36 am
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.
Title: Re: can not open output file
Post by: BlueHazzard on June 04, 2018, 10:38:56 am
What version of codeblocks are you using?
Try a nightly if this error keeps popping up...
Title: Re: can not open output file
Post by: mrwigglesworth on June 13, 2018, 02:00:54 pm
@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.
Title: Re: can not open output file
Post by: oBFusCATed on June 13, 2018, 05:36:30 pm
Can you try to find a way to reproduce the problem reliably?