Code::Blocks Forums
User forums => Help => Topic started by: epaul on May 31, 2012, 12:07:53 am
-
So as of late I have had very strange issues with code blocks.
I am taking a C++ class at a college, but I have been using code blocks months before then I have it installed on my labtop.
However starting 2 days ago I have been getting odd errors.
Here is how it usually goes:
1) I create a simple program to print out "Hello"
2) I go to build the program, everything works ok
3) I go to run the program and...nothing. Just a blank comand prompt screen. Sometimes it will give me a "Process returned 0" statment, but usually its just a black blank screen.
4) I go to rebuild the program CHANGING NOTHING. And it wont build. It gives an error like this:
ld.exe||cannot open output file C:\Users\Owner\Desktop\test.exe Permission denied|
||=== Build finished: 1 errors, 0 warnings ===|
Now here is the REALLY strange thing...at the end of all this...it wipes my homepage and resets it back to blank. And I have to restart my computer in order to reset it back. Sometimes I even have to go into the task manager and manually turn off the program..though not always.
At first I thought I might have a virus so I took it into a comp tech store to have it cleaned.
It came back clean as a whistle.
Tried to run code blocks and got the same exact thing as before. Blank command prompt, cant build due to permisson error, homepage wipe.
So I uninstalled and reinstalled code blocks. Didnt help
I ran code blocks as administrator. Didnt help
I turned off my firewall. Didnt help
So I said "Let me try it on my PC"
I DLed and installed code blocks on my PC.
I got the same exact problems (including my homepage being reset).
The same problems happen on my labtop and PC...and this all started only 2 days ago.
I have worked with and created quite a few programs with code blocks before this with no issues...but all the sudden this permissons error has stoped me cold. What scares me is that I have to have code blocks for my class (afterall it is the program he uses and requires us to use as well), and plus...well...I have been using it for a while and I like it I would really rather not change to a different program..in fact i wouldnt even know where to being looking.
So anyone have any ideas how to get around this. Like I said I tried uninstalling/turning off firewall/running as admin/even switching computers but nothing has worked.
-
Where DID YOU get the copy of Code::Blocks?
Where DID YOU get the compiler you are using?
Tim S.
-
Where DID YOU get the copy of Code::Blocks?
Where DID YOU get the compiler you are using?
Tim S.
From the codeblocks website.
http://www.codeblocks.org/downloads/26
I DLed the mingw version.
And I am using Windows 7 Home premium
-
Which source-forge server did you use?
Or if you do NOT know that, what area of the world/country are you in?
Tim S.
-
Which source-forge server did you use?
Or if you do NOT know that, what area of the world/country are you in?
Tim S.
Uhh...I clicked the source-forge link (Not the BerilOS, thought I tried that one and it still didnt work) not sure how to check which server it is though.
I am in the US, Illinois
-
Which source-forge server did you use?
Or if you do NOT know that, what area of the world/country are you in?
Tim S.
Uhh...I clicked the source-forge link (Not the BerilOS, thought I tried that one and it still didnt work) not sure how to check which server it is though.
I am in the US, Illinois
There is over a dozen source-forge servers; that is why I asked.
My download (will be about 15 minutes to finish) is from softlayer server.
The site source-forge is supposed to pick the closest; unless you pick otherwise.
Here the direct download link saying for me; http://downloads.sourceforge.net/project/codeblocks.berlios/codeblocks-10.05mingw-setup.exe?r=&ts=1338417031&use_mirror=softlayer (http://downloads.sourceforge.net/project/codeblocks.berlios/codeblocks-10.05mingw-setup.exe?r=&ts=1338417031&use_mirror=softlayer)
Tim S.
-
What browser are you having the home page change inside of?
What is the home page being changed to?
Tim S.
-
What browser are you having the home page change inside of?
What is the home page being changed to?
Tim S.
IE, though I havent checked firefox to see if its affected to.
The homepage is being changed to blank.
As in I click open IE and it go to a blank white page.
If I go into tools and try to reset my homepage and click apply then ok.....it simply does nothing changes back to blank as soon as I close the Internet Tool window.
However, when I restart my computer, my homepage is back to normal.
When I click the source-forge link this is the url I get
http://sourceforge.net/projects/codeblocks/files/Binaries/10.05/Windows/codeblocks-10.05mingw-setup.exe/download
When I open the direct link I get
http://sourceforge.net/projects/codeblocks/files/Binaries/10.05/Windows/codeblocks-10.05mingw-setup.exe/download?use_mirror=softlayer
-
Verify the path being used by Code::Block toolchain.
"Settings" -> "Compiler and Debugger"
State name of the select compiler:
Click on Tab "Tool chain executable"
State the path in this box "Compiler's Installation Directory":
Edit: I just installed the same version of Code::Blocks with MinGW and it worked OK.
NOTE: It did default to using the Wrong Compiler; it used a different version then the MinGW I downloaded with CB.
After, I changed to the downloaded MinGW GCC; It compiled Hello World without error.
Now going to launch IE.
The IE Homepage was not blank.
Tim S.
-
Verify the path being used by Code::Block toolchain.
"Settings" -> "Compiler and Debugger"
State name of the select compiler:
Click on Tab "Tool chain executable"
State the path in this box "Compiler's Installation Directory":
Edit: I just installed the same version of Code::Blocks with MinGW and it worked OK.
NOTE: It did default to using the Wrong Compiler; it used a different version then the MinGW I downloaded with CB.
After, I changed to the downloaded MinGW GCC; It compiled Hello World without error.
Now going to launch IE.
Tim S.
GNU GCC Compiler
C:\Program Files (x86)\CodeBlocks\MinGW
-
I suggest doing Windows Update to find out if you are missing a patch.
I also suggest verify all Adobe products are patched.
(Adobe has had so much problems it is worth patching)
I would also suggest making sure your virus protection is up to date.
Then, I would run an adware software.
Tim S.
-
Here is also something odd.
I went to do another test program and everything happened as stated.
However this time there was a test.exe file
I went to properties and went to the securties tab and it said to change security settings I need to be the admin. But as I said running as admin didnt work
However before I could do anything or click on anything in the securities tab to change it....the .exe file just vanished. The icon literally just went away. It didnt go to recycle and its no in the task manager it just vanished, but the .o and .cpp file were still there.
Google chrome homepage did NOT reset but IE did.
-
I suggest doing Windows Update to find out if you are missing a patch.
I also suggest verify all Adobe products are patched.
(Adobe has had so much problems it is worth patching)
I would also suggest making sure your virus protection is up to date.
Then, I would run an adware software.
Tim S.
How do I patch my Adobe products (sorry for the newbie question but I dont work with adobe that much, unless the occasional "Time to update" window pops up)
-
Your computer sounds like it might be infected; but, I really do NOT think Code::Blocks is the cause.
Note: I am running Windows 7 32 bit with IE9; and I did what you did with no issues.
Tim S.
-
Your computer sounds like it might be infected; but, I really do NOT think Code::Blocks is the cause.
Note: I am running Windows 7 32 bit with IE9; and I did what you did with no issues.
Tim S.
Thats the thing though. My comp just came back clean from the comp tech store.
I tried it on my PC (also clean) and had the same issues.
I will try it on my bro's comp once he comes but so we will see then.
But in the mean time, is there a place I can go to patch my adobe stuff. I went to their website but not sure on what to click heh.
-
How do I patch my Adobe products (sorry for the newbie question but I dont work with adobe that much, unless the occasional "Time to update" window pops up)
If you re-boot the time to update window should appear if the adobe product needs it.
That is the way I do it.
But, I also use an update manager software that checks it.
Called Secunia Personal Software Inspector (PSI) from http://secunia.com/vulnerability_scanning/personal/ (http://secunia.com/vulnerability_scanning/personal/)
Installing it is overkill for now; I would update the other items first.
Tim S.
-
Thats the thing though. My comp just came back clean from the comp tech store.
I tried it on my PC (also clean) and had the same issues.
That really only means the problem is not one detected by yours or the tech store software.
Unless they reformatted it, it could still be infected.
WARNING: Do NOT stick any device in your brothers computer; you may have an infected flash drive.
NOTE: Using your desktop as the place to do your projects IS a very bad idea.
Your virus protection software might be blocking it.
Tim S.
-
Thats the thing though. My comp just came back clean from the comp tech store.
I tried it on my PC (also clean) and had the same issues.
That really only means the problem is not one detected by yours or the tech store software.
Unless they reformatted it, it could still be infected.
WARNING: Do NOT stick any device in your brothers computer; you may have an infected flash drive.
NOTE: Using your desktop as the place to do your projects IS a very bad idea.
Your virus protection software might be blocking it.
Tim S.
Oh I know. I am just going to DL codeblocks from the website like I normally would.
I dont normally store things on my desktop I have a CSC file folder for it. I just did it there since it was a test. I happen when I save them in my file folder as well.
-
So I DLed and installed code blocks like normal on his comp (same OS)
Got the same exact problems including the homepage wipe.
And something else. When I went to close out code blocks something came up saying
"The default perspective of code blocks has changed, do you want to save this new layout?"
I xed out of the window cause I didnt know what to say...what does this mean?
But again all 3 computers in my house (Mine just got back from being cleaned but the other 2 I am SURE are clean) seem to have this same error with code blocks. Could there be a problem with the server I am using to download it?
-
"The default perspective of code blocks has changed, do you want to save this new layout?"
This happens every time I adjust a window in Code::Blocks.
It is very unlikely the sf server is the problem; but, it is possible.
Turn on FULL Compiler Logging to see if it is a bad code/compiler/project issue.
http://wiki.codeblocks.org/index.php?title=FAQ-Compiling_%28errors%29#Q:_How_do_I_troubleshoot_a_compiler_problem.3F (http://wiki.codeblocks.org/index.php?title=FAQ-Compiling_%28errors%29#Q:_How_do_I_troubleshoot_a_compiler_problem.3F)
Also, Post the code you are trying to compile.
Tim S.
-
I am going with user error in the program till I rule it out.
So, post the code and full re-build of the project.
Note: The others on this site; might recall issues for the old 10.05 release; but, 2 years is too long for me to remember a bug like this.
Tim S.
-
"The default perspective of code blocks has changed, do you want to save this new layout?"
This happens every time I adjust a window in Code::Blocks.
It is very unlikely the sf server is the problem; but, it is possible.
Turn on FULL Compiler Logging to see if it is a bad code/compiler/project issue.
http://wiki.codeblocks.org/index.php?title=FAQ-Compiling_%28errors%29#Q:_How_do_I_troubleshoot_a_compiler_problem.3F (http://wiki.codeblocks.org/index.php?title=FAQ-Compiling_%28errors%29#Q:_How_do_I_troubleshoot_a_compiler_problem.3F)
Also, Post the code you are trying to compile.
Tim S.
the code is
#include <iostream>
using namespace std;
int main()
{
cout<<"hello"<<endl;
return 0;
}
I turned on full compiler and I am not sure what to look for.
Here is what the build log came up with
mingw32-g++.exe -o "C:\Users\Owner\Desktop\CSC code\test.exe" "C:\Users\Owner\Desktop\CSC code\test.o"
c:/program files (x86)/codeblocks/mingw/bin/../lib/gcc/mingw32/4.4.1/../../../../mingw32/bin/ld.exe: cannot open output file C:\Users\Owner\Desktop\CSC code\test.exe: Permission denied
collect2: ld returned 1 exit status
Process terminated with status 1 (0 minutes, 5 seconds)
1 errors, 0 warnings
-
Do a re-build NOT a build and past the build log from that.
Also, do it in a legal to use folder NOT the desktop!
Tim S.
-
Do a re-build NOT a build and past the build log from that.
Also, do it in a legal to use folder NOT the desktop!
Tim S.
To get a better view here is what I will do.
Using the same code I made a new testtwo.cpp
First build log (from a fresh new file):
mingw32-g++.exe -c "C:\Users\Owner\Desktop\CSC code\testtwo.cpp" -o "C:\Users\Owner\Desktop\CSC code\testtwo.o"
mingw32-g++.exe -o "C:\Users\Owner\Desktop\CSC code\testtwo.exe" "C:\Users\Owner\Desktop\CSC code\testtwo.o"
Process terminated with status 0 (0 minutes, 9 seconds)
0 errors, 0 warnings
Ran program:
Didnt let me....said it had not been bulit yet do you want to build now?
Clicked yes
Build log from there:
mingw32-g++.exe -c "C:\Users\Owner\Desktop\CSC code\testtwo.cpp" -o "C:\Users\Owner\Desktop\CSC code\testtwo.o"
mingw32-g++.exe -o "C:\Users\Owner\Desktop\CSC code\testtwo.exe" "C:\Users\Owner\Desktop\CSC code\testtwo.o"
c:/program files (x86)/codeblocks/mingw/bin/../lib/gcc/mingw32/4.4.1/../../../../mingw32/bin/ld.exe: cannot open output file C:\Users\Owner\Desktop\CSC code\testtwo.exe: Permission denied
collect2: ld returned 1 exit status
Process terminated with status 1 (0 minutes, 0 seconds)
1 errors, 0 warnings
And here is my code as before:
#include <iostream>
using namespace std;
int main()
{
cout<<"hello"<<endl;
return 0;
}
EDIT: Missed your last minute edit there....what do you mean legal folder? I have a CSC folder that is on my desktop that I store my code in...what do you mean by legal folder?
-
I have TOLD you twice DO NOT use the desktop to build the project.
A legal folder is one that is is safe to do programming in.
The C:\ IS NOT LEGAL.
The C:\program files is NOT legal.
Try something like "C:\Users\username\Documents\CB-Folder"
Tim S.
-
I have TOLD you twice DO NOT use the desktop to build the project.
Tim S.
Sorry I thought you ment do not story the files directly on the desktop. I am not trying to be difficult but I do not know what you mean by a legal folder. I usually store most of stuff in folders and I have those folders on a desktop.
Where else should I create a folder?
-
I am giving up helping you maybe one of the others will figure out what you are doing wrong.
1. Your anti-virus is the cause of all the issues
2. Some user error that I am not seeing
3. Windows security is the cause of the problem
4. The likely things you are really infected by a virus.
5. A mixture of the above.
6. something else.
READ ALL THE FAQs esp this one http://wiki.codeblocks.org/index.php?title=FAQ-Compiling_%28errors%29#Q:_My_build_fails_in_the_compile.2Flink.2Frun_step_with_a_Permission_denied_error.3F (http://wiki.codeblocks.org/index.php?title=FAQ-Compiling_%28errors%29#Q:_My_build_fails_in_the_compile.2Flink.2Frun_step_with_a_Permission_denied_error.3F)
Tim S.
-
I have TOLD you twice DO NOT use the desktop to build the project.
A legal folder is one that is is safe to do programming in.
The C:\ IS NOT LEGAL.
The C:\program files is NOT legal.
Try something like "C:\Users\username\Documents\CB-Folder"
Tim S.
So like this?
Using the same code
First build from a fresh file:
mingw32-g++.exe -o C:\Users\Owner\Documents\CB-Folder\testtwo.exe C:\Users\Owner\Documents\CB-Folder\testtwo.o
Process terminated with status 0 (0 minutes, 27 seconds)
0 errors, 0 warnings
Ran program (quickly after): Got a black command prompt with the "Process returned 0" message.
Secound build (did not alter any code):
mingw32-g++.exe -c C:\Users\Owner\Documents\CB-Folder\testtwo.cpp -o C:\Users\Owner\Documents\CB-Folder\testtwo.o
mingw32-g++.exe -o C:\Users\Owner\Documents\CB-Folder\testtwo.exe C:\Users\Owner\Documents\CB-Folder\testtwo.o
c:/program files (x86)/codeblocks/mingw/bin/../lib/gcc/mingw32/4.4.1/../../../../mingw32/bin/ld.exe: cannot open output file C:\Users\Owner\Documents\CB-Folder\testtwo.exe: Permission denied
collect2: ld returned 1 exit status
Process terminated with status 1 (0 minutes, 0 seconds)
1 errors, 0 warnings
One thing of note...the .exe file seems to vanish shortly after being created as I cannot see it in the CB folder anymore.
-
I am giving up helping you maybe one of the others will figure out what you are doing wrong.
1. Your anti-virus is the cause of all the issues
2. Some user error that I am not seeing
3. Windows security is the cause of the problem
4. The likely things you are really infected by a virus.
5. A mixture of the above.
6. something else.
READ ALL THE FAQs esp this one http://wiki.codeblocks.org/index.php?title=FAQ-Compiling_%28errors%29#Q:_My_build_fails_in_the_compile.2Flink.2Frun_step_with_a_Permission_denied_error.3F (http://wiki.codeblocks.org/index.php?title=FAQ-Compiling_%28errors%29#Q:_My_build_fails_in_the_compile.2Flink.2Frun_step_with_a_Permission_denied_error.3F)
Tim S.
I tried turnning off my AV and Firewall and that didnt work. I also tried this on all 3 comps...each one with the same error so I dont think its possible all 3 are infected considering I am pretty safe and my bro is insane about the compe security of his and our PC...to the point where I had to almost beg him to let me check if this code block problem happens on his labtop as well.
Thanks for your help though. I hope someone else can see what I cant.
-
This has just gone into full blown bizzaro mode now.
On a whim I opened some of my programs that I know worked and were already created (didnt want to risk getting them messed up but if I cant get code blocks working I cant continue in the class any how)
So I opened up a simple additon program .cpp file in codeblocks
Built it: Smooth
Ran it: Smooth
my face: :o
So I did this about 10 more times and everything was flawless.
So I decided to build another "hello" test program.
Back to having issues as before.
So im out of my mind right now and decide to be tricky.
I literally copy/past my addition program into a new file.
I Build it: Smooth
Run it: Smooth
Now I start to get creeped out and decide to go further. I change it from addition to subtraction
Smooth all the way through.
So I seem to have found a work around. I open old "non corrupt?" .cpp files. Copy their code. Past it in a new fresh file. Then alter the code as I need to for that program.
This is just waaay crazy...but at least for now I wont have to drop the class it seems if this workaround holds up for the next 4 weeks. But anyone else who may have some insight as to why this chaos is happening please chime in.
-
Well scratch that....
Seem that it doesnt work afterall.
The problem lies in that...after the .exe file is created...it vanishes soon after.
Seems bigger .exe files vanish slower than smaller ones...but eventually all the .exe files vanish (and right before they do is when I get the permissons error)
-
Ok so it seem that this is the root of the problem
When I copy over old working code to a new file and rename it it seems to work just fine...for a few min.
But eventually what happens is that that the .exe vanishes...and I mean it drops out COMPLETLY.
I search for it in my comp but its not there...but .cpp and .o files ARE there however...but every time I try to build it gives me the permissions error.
It is in the moments before the .exe file vanishes that when I run the program the blank command prompt shows up.
I think the root cause is w/e is making these .exe files vanish.
-
epaul, your computer is seriously infected with a vicious virus and you need to do something about it.
For start,
- download the Revo Uninstaller (Portable edition) and check which programs you have installed that you don't recognize that look suspicious to you. Please use the advanced way and READ EACH LINE IT SAYS TO YOU! It's important to understand what you will be doing!
- Clean temporary files, which under Windows 7 are spreaded in 2-3 different directories
- Your technician most probably just deleted obvious files from desktop to make it look "clean", but still the virus is there damaging your computer.
- The way I clean the PCs at work (more or less around 80 PCs) is to manually delete temporary files using a Linux LiveCD. That way I know that the virus will not prevent me from deleting it, because under a liveCD won't be able to a) get recognized as a Windows executable, and b) won't get activated at all as a running process.
- With the same way you should check your USBs / external HDDs, because most probably the virus is there too, well hidden in either recycle bin's hidden folder, or in System Volume Information
- An antivirus I use and I am very pleased up to now is Avira Antivir, and as I said in your case, what you should do is to download it (see links below) and run it upon boot.
- In case your issues remain the same, then I would suggest you give a try to nightly builds which are very stable and we know that work just fine.
Useful Links
- Avira Rescue System (http://www.avira.com/downloads/frontendDl/defaultDownload?product=avira-antivir-rescue-system&os=)
- Revo Uninstaller Portable (http://www.revouninstaller.com/download/revouninstaller.zip)
- Knoppix LiveDVD (http://ftp://ftp.uni-kl.de/pub/linux/knoppix-dvd/KNOPPIX_V6.7.0DVD-2011-08-01-EN.iso)
If you need anything, just ask.
Cheers
-
I agree, your computer is obviously infected. (I think not only yours, in fact... )
I know a website (sadly, or not depending on point of vue, it is a french one, but it seem google translate is able to translate correctly - not perfectly - when going from french to english) where people wrote a procedure to clean computer, it was made for people with no or only a few technical knowledge, but when I discovered it I learn many interesting things (and discovered some useful softwares too).
Oh, and tools they use does not require payments for "home users". This is interesting for some people...
Here is the translated webpage:
http://translate.google.fr/translate?sl=fr&tl=en&js=n&prev=_t&hl=fr&ie=UTF-8&layout=2&eotf=1&u=http%3A%2F%2Fassiste.com.free.fr%2Fla_mini_manip.html
Last time I checked, (there are maybe 2 years, but it was updated since) that procedure helped some friends to clean their computers on themselves.
Hope it will be usable...
-
Ok well I will look more into if my comp is infect (Also trying to set up a time where I can see my professor to see if he can figure this out as well). I dont see how that is possible though since the issues I am having occur only when I use code blocks. If I dont touch code blocks everything is fast and smooth. But as soon as I open it thats when stuff starts going wack, and even then only with code block .exe files, everything else is peachy king.
O well though, if nothing else works it wont hurt. Just hope I dont have to drop the class because of not getting it to work (a good 6 months of no issues then now this happens >.<)
Thanks all for your help.
-
Ok this is going to sound really stupid of me.
I found out why my .exe files are disappearing and why code blocks was acting off.
You guys were 1/2 right. My comp was infected....with my files :P
For some reason my AV (Bitdefender) was reading my .exe files as viruses and thus deleting them. And guess what My Laptop, my bros laptop, and our PC all have in common...the same AV (Bitdefender).
I thought I had checked the logs of my AV but I was going through them too fast (in frustration) that I must have missed them or not scrolled down enough to see.
So I went to my AV and excluded the folder I put all my code in.
Reinstalled Codeblocks
Now my .exe files dont vanish....because they dont exist heh. NOW every time I try to build a file it doesnt do anything. I click build but nothing happens. I clicked ctrl-f9 and nothing happens. I click build and run and it says:
"The file has not been built yet would you like to build it now?"
I click yes and nothing happens still.
The build log does not show anything. Just whitespace.
Here is the odd thing. When I close code blocks it gives me the option of saving my file. So I save it as a .cpp file (as if I was building it). I then go back and open this .cpp file to code block and click build and run.
Nothing happens again.
So it seems now when ever I click the build button it just doesnt work. I will continue to investigate but is there a know fix for something like this?
(Yes I triple checked and I DO have the mingw version so I should be able to compile. and GNU GCC Compiler is selected).
-
Are you sure your AV did not remove mingw?
What happens if you try to compile from command line?
If nothing happens in command line in normal mode, try to boot it in "no fail" mode (not sure of the english sentence...) and try to compile from command line.
If it works, try with C::B.
If it works again, the problem is not related to C::B.
And if problem is not related to C::B, it might be your AV again, for example.
(I really hate antiviruses... they are mostly junk, and they gave me problems more often than viruses on my computers. In fact, I do not remember having infected by so many viruses when I were using windows... )
-
Are you sure your AV did not remove mingw?
What happens if you try to compile from command line?
If nothing happens in command line in normal mode, try to boot it in "no fail" mode (not sure of the english sentence...) and try to compile from command line.
If it works, try with C::B.
If it works again, the problem is not related to C::B.
And if problem is not related to C::B, it might be your AV again, for example.
(I really hate antiviruses... they are mostly junk, and they gave me problems more often than viruses on my computers. In fact, I do not remember having infected by so many viruses when I were using windows... )
Turns out the pathing was wrong.
I clicked the auto detect path and it found it again.
Everything is up and running now (has been fine for about a week so I didnt want to post until I was sure it was ok).
I will have to pay closer attention to my overactive AV now heh Thanks all.