Code::Blocks Forums

User forums => Help => Topic started by: beancox on April 19, 2011, 12:20:02 pm

Title: I need help real badly.
Post by: beancox 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.
Title: Re: I need help real badly.
Post by: Jenna 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.
Title: Re: I need help real badly.
Post by: beancox 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 .
Title: Re: I need help real badly.
Post by: Jenna 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.
Title: Re: I need help real badly.
Post by: beancox 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:
Title: Re: I need help real badly.
Post by: Jenna 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.
Title: Re: I need help real badly.
Post by: beancox 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
Title: Re: I need help real badly.
Post by: beancox 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
.
Title: Re: I need help real badly.
Post by: beancox on April 19, 2011, 02:48:15 pm
i've uninstalled the .net framework 4     but the problem still exists.
in despair....
Title: Re: I need help real badly.
Post by: beancox 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.
Title: Re: I need help real badly.
Post by: oBFusCATed 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:
Title: Re: I need help real badly.
Post by: beancox on April 19, 2011, 04:29:17 pm
i don't think i have got all that you mean
Title: Re: I need help real badly.
Post by: oBFusCATed on April 19, 2011, 04:41:45 pm
Unfortunately...  :?
Title: Re: I need help real badly.
Post by: stahta01 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.
Title: Re: I need help real badly.
Post by: beancox 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.
Title: Re: I need help real badly.
Post by: stahta01 on April 20, 2011, 01:49:42 am
Learn TO GOOGLE and DO NOT SEND PMs TO ME!!!!!!!!!!!!!

Learn to READ!!!!!!!

http://wiki.codeblocks.org/index.php?title=Main_Page

http://wiki.codeblocks.org/index.php?title=FAQ

http://www.codeblocks.org/user-manual


Tim S.
Title: Re: I need help real badly.
Post by: beancox 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.
Title: Re: I need help real badly.
Post by: beancox 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.
Title: Re: I need help real badly.
Post by: beancox 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 ?
Title: Re: I need help real badly.
Post by: ollydbg 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.
Title: Re: I need help real badly.
Post by: MortenMacFly 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.
Title: Re: I need help real badly.
Post by: beancox 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.
 
Title: Re: I need help real badly.
Post by: beancox 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.
Title: Re: I need help real badly.
Post by: Jenna 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: .
Title: Re: I need help real badly.
Post by: beancox 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.
Title: Re: I need help real badly.
Post by: Jenna 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.
Title: Re: I need help real badly.
Post by: beancox on April 20, 2011, 10:55:03 am
but  there isn't any processes running in task manager.   how can i make further step.
Title: Re: I need help real badly.
Post by: ironhead on April 20, 2011, 12:46:17 pm
The file is locked, you can try unlocker (http://www.emptyloop.com/unlocker/) to unlock it.
Title: Re: I need help real badly.
Post by: beancox on April 20, 2011, 12:51:35 pm
thanks .  I will try it . 
Title: Re: I need help real badly.
Post by: beancox 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 .
Title: Re: I need help real badly.
Post by: ollydbg 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? (http://wiki.codeblocks.org/index.php?title=FAQ#Q:_How_do_I_troubleshoot_an_compiler_problem.3F)
Title: Re: I need help real badly.
Post by: beancox on April 20, 2011, 01:49:41 pm
thanks , i will follow your methods to try again..
Title: Re: I need help real badly.
Post by: beancox 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
 
Title: Re: I need help real badly.
Post by: MortenMacFly 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.
Title: Re: I need help real badly.
Post by: beancox 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 .
Title: Re: I need help real badly.
Post by: Jenna 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.
Title: Re: I need help real badly.
Post by: beancox 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 . 
Title: Re: I need help real badly.
Post by: beancox 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 .
Title: Re: I need help real badly.
Post by: ouch 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.
Title: Re: I need help real badly.
Post by: beancox 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 .