Author Topic: I need help real badly.  (Read 21105 times)

Offline beancox

  • Multiple posting newcomer
  • *
  • Posts: 28
I need help real badly.
« on: April 19, 2011, 12:20:02 pm »
hey guys.thanks for clicking and helping me.
First of all, i have to admit english is not my mother tougue.So there may be some grammar mistakes in my descrpition  ,but i will try my
 best to avoid them .  here comes the problem.
I'm learning C, not cpp.
Today ,when i open some old files in my folder(which is absolutely right,without mistake),it can be executed first time. but when i tried the second time ,   the problem appears.   here is the words on build log
f:/codeblocks/mingw/bin/../lib/gcc/mingw32/4.4.1/../../../../mingw32/bin/ld.exe: cannot open output file D:\Files\2-3-3-4.exe: Permission denied
collect2: ld returned 1 exit status
Process terminated with status 1 (0 minutes, 0 seconds)
1 errors, 0 warnings

and,not a single file alone. every file is just like this .even the simplest "hellowolrd.c" can only be executed once.
in addidion ,my os is window-7 64bit. and c::b went well before .
i've googled the problem for settlement . but the methods seem quite alike. first,there isn't any process related  running. second ,it isn't read-only.
i've reinstalled c::b  but it doesn't work.   i saw some guy sayed it's a bug. is it ?
i need your help badly
thanks in advance.

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: I need help real badly.
« Reply #1 on: April 19, 2011, 01:30:21 pm »
Are you sure the processes are not running in the background and prevent writing to the exe a second time ?

Do you have any antivirus or other so called "security"-software installed ?
This might interfere with the compiler.

Offline beancox

  • Multiple posting newcomer
  • *
  • Posts: 28
Re: I need help real badly.
« Reply #2 on: April 19, 2011, 01:50:27 pm »
yeah .i am sure using shift+ctrl+del  there ain't the exe running .
as for security(mine is avira anti-virus) .  i have make it a exception for c::b to run without problems.
i just don't know how to deal with it .

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: I need help real badly.
« Reply #3 on: April 19, 2011, 01:57:09 pm »
It's not C::B that does not work, it's either the compiler/linker of your compiler-suite or the executables you have built.

Offline beancox

  • Multiple posting newcomer
  • *
  • Posts: 28
Re: I need help real badly.
« Reply #4 on: April 19, 2011, 02:07:50 pm »
but i've reinstalled c::b several times   
and i didn't change the settings .  it is all default .    how could this happen .?   someone says it's a bug ,is it ?
it didn't occur last several months . but it did appear today ... OMG. :shock:

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: I need help real badly.
« Reply #5 on: April 19, 2011, 02:14:35 pm »
but i've reinstalled c::b several times   
and i didn't change the settings .  it is all default .    how could this happen .?   someone says it's a bug ,is it ?
it didn't occur last several months . but it did appear today ... OMG. :shock:
Did you change anything else on your system (updates etc.) ?

Be aware:
C::B is not a compiler or a linker, it's just an IDE !!
You get an error from your linker, not from C::B.

Offline beancox

  • Multiple posting newcomer
  • *
  • Posts: 28
Re: I need help real badly.
« Reply #6 on: April 19, 2011, 02:24:50 pm »
yes.   recently i update .net framework4
does it have problems with compiler?  my c::b is the latest version 10.05 with mingw

Offline beancox

  • Multiple posting newcomer
  • *
  • Posts: 28
Re: I need help real badly.
« Reply #7 on: April 19, 2011, 02:29:15 pm »
besides  what confuses me is that every file can be compiler and executed for the first time without difficulty. however,when
it is executed the second ,third ,or more times ,  the problem above appear
.

Offline beancox

  • Multiple posting newcomer
  • *
  • Posts: 28
Re: I need help real badly.
« Reply #8 on: April 19, 2011, 02:48:15 pm »
i've uninstalled the .net framework 4     but the problem still exists.
in despair....

Offline beancox

  • Multiple posting newcomer
  • *
  • Posts: 28
Re: I need help real badly.
« Reply #9 on: April 19, 2011, 04:08:16 pm »
i uninstalled the avira anti-virus. 
again...   it seems that it's never gonna to be solved.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: I need help real badly.
« Reply #10 on: April 19, 2011, 04:20:09 pm »
Have you read this: http://wiki.codeblocks.org/index.php?title=FAQ#Q:_How_do_I_troubleshoot_an_compiler_problem.3F ?

p.s. Does your keyboard have shift key? If it has please start to use it :)
p.p.s. The main purpose of my post is to tell you about the shift key  :lol:
(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!]

Offline beancox

  • Multiple posting newcomer
  • *
  • Posts: 28
Re: I need help real badly.
« Reply #11 on: April 19, 2011, 04:29:17 pm »
i don't think i have got all that you mean

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: I need help real badly.
« Reply #12 on: April 19, 2011, 04:41:45 pm »
Unfortunately...  :?
(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!]

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7582
    • My Best Post
Re: I need help real badly.
« Reply #13 on: April 19, 2011, 07:59:52 pm »
yeah .i am sure using shift+ctrl+del  there ain't the exe running .

This statement is NOT correct; did you use task manager to confirm no copy of your exe is running?

Tim S.
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline beancox

  • Multiple posting newcomer
  • *
  • Posts: 28
Re: I need help real badly.
« Reply #14 on: April 20, 2011, 12:54:20 am »
yeah.   I check it with task manager,or more detail managers(provided by other softwares).
My project is console application ,but i am confused that when the screen displays "press any key to continue"  ,and i did so ,the windows disappear. Everything just seems as natural as before,but in task manager , there is a process name " conhost " still running .  I don't know if it has something to do with the problem.
My os is windows-7 64bit ultimate.
I need help badly. I don't know what to do .  Without c::b ,how can I continue my study major in computer science.

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7582
    • My Best Post
Re: I need help real badly.
« Reply #15 on: April 20, 2011, 01:49:42 am »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline beancox

  • Multiple posting newcomer
  • *
  • Posts: 28
Re: I need help real badly.
« Reply #16 on: April 20, 2011, 02:00:35 am »
I have googled it for quite a long time.
The solutions seem quite alike but they don't do mine.
I'm sorry to bother you for send PMs  ,but i just wanna solve the problem ASAP.

Offline beancox

  • Multiple posting newcomer
  • *
  • Posts: 28
Re: I need help real badly.
« Reply #17 on: April 20, 2011, 02:34:03 am »
Though I changed the compiler the problem still exist .  what's wrong ...  any methods?
who's gonna help me out.

Offline beancox

  • Multiple posting newcomer
  • *
  • Posts: 28
Re: I need help real badly.
« Reply #18 on: April 20, 2011, 07:13:12 am »
I have reboot my os.   windows-7 ultimate.
in despair , it remains unsettled .   
It took me a whole day to fix it ,,, but nothing paid off.
someone coming to save me ?

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5910
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: I need help real badly.
« Reply #19 on: April 20, 2011, 07:47:12 am »
You recent posts does not supply any useful information about your bug/error.
so:
1, show us the steps by steps to produce the bug/error
2, show the full build log

Mostly, you bug/error I think is not related to C::B.
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: I need help real badly.
« Reply #20 on: April 20, 2011, 08:10:34 am »
Quote
ld.exe: cannot open output file D:\Files\2-3-3-4.exe: Permission denied
Note: Usually the linker is always right. Did you try the most simple case: Can you create a file named 2-3-3-4.exe in D:\Files? And I really mean exactly that file name with that extension.

In addition: As you see: this is a linker error. So for the record: It cannot be an issue with C::B.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline beancox

  • Multiple posting newcomer
  • *
  • Posts: 28
Re: I need help real badly.
« Reply #21 on: April 20, 2011, 08:35:16 am »
I came to realize that it has nothing to do with c::b
and I don't wanna give up c::b ,so I'm trying some other compilers.  I cannot create or open the file     2-3-3-4.exe in D:\Files
as for full buildlog ,  i've posted at first . here comes the full build-log again. 
Compiling: D:\Files\2-3-2-2.c
Linking console executable: D:\Files\2-3-2-2.exe
f:/codeblocks/mingw/bin/../lib/gcc/mingw32/4.4.1/../../../../mingw32/bin/ld.exe: cannot open output file D:\Files\2-3-2-2.exe: Permission denied
collect2: ld returned 1 exit status
Process terminated with status 1 (0 minutes, 0 seconds)
1 errors, 0 warnings

That's exactly full of the buildlog.
 

Offline beancox

  • Multiple posting newcomer
  • *
  • Posts: 28
Re: I need help real badly.
« Reply #22 on: April 20, 2011, 09:50:27 am »
who can give me address of somewhat compilers other than mingw,    I search for a long time but in vain.

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: I need help real badly.
« Reply #23 on: April 20, 2011, 10:06:03 am »
If this error occurs, can you delete the exe-file manually ?
If not the exe is still running.

You can also try to compile a project below your user-folder on drive c: .

Offline beancox

  • Multiple posting newcomer
  • *
  • Posts: 28
Re: I need help real badly.
« Reply #24 on: April 20, 2011, 10:23:41 am »
No, i cannot delete the exe.
It's the last hope
 i will try it in project no longer in files alone.

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: I need help real badly.
« Reply #25 on: April 20, 2011, 10:50:52 am »
No, i cannot delete the exe.
It's the last hope
 i will try it in project no longer in files alone.

If you can not delete the exe, it usually means it's still running.

Offline beancox

  • Multiple posting newcomer
  • *
  • Posts: 28
Re: I need help real badly.
« Reply #26 on: April 20, 2011, 10:55:03 am »
but  there isn't any processes running in task manager.   how can i make further step.

Offline ironhead

  • Almost regular
  • **
  • Posts: 210
Re: I need help real badly.
« Reply #27 on: April 20, 2011, 12:46:17 pm »
The file is locked, you can try unlocker to unlock it.

Offline beancox

  • Multiple posting newcomer
  • *
  • Posts: 28
Re: I need help real badly.
« Reply #28 on: April 20, 2011, 12:51:35 pm »
thanks .  I will try it . 

Offline beancox

  • Multiple posting newcomer
  • *
  • Posts: 28
Re: I need help real badly.
« Reply #29 on: April 20, 2011, 01:21:32 pm »
unfortunately, unlocker doesn't make it .   the unlocker says nothing locks the file but still  i cannot open or delete it .

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5910
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: I need help real badly.
« Reply #30 on: April 20, 2011, 01:36:39 pm »
unfortunately, unlocker doesn't make it .   the unlocker says nothing locks the file but still  i cannot open or delete it .
too bad news.
So, you can create a new project, and copy the source file, and build the project again.
BTW: you need to post the "full" build log, not the simplified build log. see the wiki
2.14 Q: How do I troubleshoot an compiler problem?
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Offline beancox

  • Multiple posting newcomer
  • *
  • Posts: 28
Re: I need help real badly.
« Reply #31 on: April 20, 2011, 01:49:41 pm »
thanks , i will follow your methods to try again..

Offline beancox

  • Multiple posting newcomer
  • *
  • Posts: 28
Re: I need help real badly.
« Reply #32 on: April 20, 2011, 01:54:05 pm »
fail  again ...    over and over again.    here is the buildlog
-------------- Build: Debug in test123 ---------------

mingw32-g++.exe -LG:\MingW\mingw32\bin  -o bin\Debug\test123.exe obj\Debug\main.o   
f:/codeblocks/mingw/bin/../lib/gcc/mingw32/4.4.1/../../../../mingw32/bin/ld.exe: cannot open output file bin\Debug\test123.exe: Permission denied
collect2: ld returned 1 exit status
Process terminated with status 1 (0 minutes, 0 seconds)
1 errors, 0 warnings
 

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: I need help real badly.
« Reply #33 on: April 20, 2011, 01:56:48 pm »
Look, if you cannot delete this file there is NO WAY the compiler / linker can do. If you find out how to delete it yourself (e.g. by correcting the file system's directory/file permissions) you are done.

You need to use / setup a folder with full write access to work in - and you don't need C::B for that.

And please don't ask here as this is definitely not a C::B issue, but an issue with the file access permissions.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline beancox

  • Multiple posting newcomer
  • *
  • Posts: 28
Re: I need help real badly.
« Reply #34 on: April 20, 2011, 02:30:43 pm »
I want some more details about how to use another compiler even I made some attempts . but after my settings are over,  and I click build and run ,  nothing gonna happen .

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: I need help real badly.
« Reply #35 on: April 20, 2011, 02:35:54 pm »
You have to install another compiler. C::B only ships with MinGW (or nothing).
It's up to you to find a supported compiler.
See the list in the settings, find a place to download the compiler you want and set it up.

But without fixing your problem, you will still not be able to do anything.
If you can not delete (or overwrite) the file manually, another compiler can't do it also.

But to fix this problem, you are in the wrong place.
Search the web for this error or find a forum that supports windows 7 problems.

Offline beancox

  • Multiple posting newcomer
  • *
  • Posts: 28
Re: I need help real badly.
« Reply #36 on: April 20, 2011, 02:56:37 pm »
thanks for your guys timely help.
 i'm gonna be with c:b till the last second . 

Offline beancox

  • Multiple posting newcomer
  • *
  • Posts: 28
Re: I need help real badly.
« Reply #37 on: April 21, 2011, 04:03:40 am »
I'm back.  I've rebooted my os and used some of the updates provided by MS.  It's OK till now . hope it will be like what it is now .

Offline ouch

  • Almost regular
  • **
  • Posts: 223
Re: I need help real badly.
« Reply #38 on: April 21, 2011, 11:44:05 pm »
I've seen Spybot S&D do this.

I've also seen Indexing services do this too.

Offline beancox

  • Multiple posting newcomer
  • *
  • Posts: 28
Re: I need help real badly.
« Reply #39 on: April 22, 2011, 03:18:16 am »
yep.   
Some anti-virus software say that c::b's cb_console_runner.exe is virus ,though it is not .
maybe some updates provided by MS are in the same way and forbid  cb_console_runner.exe to execute when changes i
in files(projects) take place.
As for indexing services , I have no idea about it .