Interesting code:blocks issues

Pages: 12
Alright so here's one for you.

Yesterday, I get home after work and get on the computer. Go to open up code:blocks and I was getting an error message relating to a config file in AppData. So I look up the issue, and people say just delete it and restart C:B. So I do that, and now C:B opens up fine.

I open up the project I'm working on, make some changes, hit build and run. I notice it "builds" almost instantly, and runs but it runs the old code before the change. I close the window, look at the code, and it looks fine. So I think, "Ok, I'll save the project, close C:B, reopen and build again". I do all that, and sure enough it still doesn't work. I look at the build log and see that the toolchain path is messed up supposedly. So I go in and verify that everything is in the right place and C:B is finding everything. Says it is, so I try again, and sure enough still not building. I was getting annoyed at this point, so I try resetting the toolchain path to default (I knew it used to work just two days ago), and it gives me a nice little "Congrats this worked just fine" message. So I was excited, go to the project, hit build, and nothing. No building.

After all this, I decide that ok, I'll just uninstall C:B, and download a new one. That takes a little bit, I come back after it's all installed, open my project again, and now it builds. Supposedly. So I run the program, and now my anti-virus pops up a message and tells my program is now a trojan horse! I close this box cause I know it's not, and go to my window, and nothing is being displayed. It just said it ran and how long it took (which was almost nothing since it did nothing).

My next test was to make a new project and see what happened. Sure enough, same story. Builds, runs, AV gets mad, no output. After this, I was running out of ideas. I ran my AV, sure enough my one virus was still my program, so I deleted it. (I have a backup, of course). Loaded in my backup copy, built, ran, and same damn thing! No output, and AVG still says its a virus. And no, not a single system call in there.

tl;dr, C:B f****ed up and now won't run anything, EVER! Not sure what to do
I guess that, either you are somehow working on a copy of the files, or the project just lost track of everything.
At worst you would just need to regenerate the project (the structure).
Try to clean the build and see the makefile.

Also, kill the antivirus.
And issue bugs reports.

Off Topic:
That takes a little bit
As in a significant time that is annoying.
Or so fast that you wouldn't notice.
Edit: Oh, you've got to download again, never mind.
Last edited on
It sounds like you didn't update the project's compiler when you set up your compilers again.
Be aware that C::B checks the compilers when it starts - so if a compiler is unavailable then (for example, because you haven't mounted the partition yet), you have to restart C::B after fixing it.
The rest is AVG's fault - purge it.
Tried all this. Nothing. I'm still getting the same damn errors
Regarding the AV issue, Avast did something similar concerning new applications with no reputation. See if there is an exclude setting you can add the project directory to. Does AVG give you a specific virus name?
Ok ok, what the f*** is this sh**? I was messing with everything, decided to have main return 1 for shits and giggles, and sure enough it runs just fine. No problems. I go back to return 0, and doesn't output and AV gets pissy again.

EDIT:
Pardon my language. Frustration got the best of me. Just sooo tired of this. Putting me quite behind on my project.
Last edited on
Putting me quite behind on my project.

Oh come on! So the IDE misbehaves... that doesn't stop you from writing code.

http://www.kaspersky.com/virusscanner
http://nuwen.net/mingw.html
http://www.pnotepad.org/
http://www.youtube.com/watch?v=_2TMwxTxDBY
I can't even get a compiler to work lol. Can't find it at all via command prompt. Tempted to throw Linux on a VM and work through that.

Still having this problem though
If the AV is still giving you problems, you probably didn't uninstall it properly. You might need to reboot in order to get rid of the resident shield as well.

Can't find it at all via command prompt.

You need to add it to PATH.
I have added it to the the path variable. Multiple times even. I tried just sticking the MingW directory in there and that didnt work, so I tried sticking the MingW\bin directory in there and same thing. I originally thought it was my compiler, but this whole returning 1 and it works but returning 0 and it doesn't makes me think otherwise. I've never heard of the problem and can't seem to find it anywhere.
And all my settings match on my work computer (which I'm on now), and it works fine here.

Do you really think AVG could be causing all of this mess?
If it complains about your programs when you run them, then it's the reason you can't run them, in any case.
Do you have any idea on the return deal?
So I run the program, and now my anti-virus pops up a message and tells my program is now a trojan horse! I close this box cause I know it's not, and go to my window, and nothing is being displayed.

Obviously, because it's not like anybody can infiltrate an open-source project and add malicious code. And an antivirus is not trustworthy anyway, especially if it says the same thing for different programs.
I've deleted C:B entirely, ran a full virus scan, and then reinstalled. I doubt that C:B has been compromised.
Try installing the custom build of MinGW I linked to a couple of posts ago.
If that works, you can continue your project work by compiling from the command line (it has ready-made batch files for setting up paths).
Ah yea I haven't had time to installing that yet. Does look nice though. I think I'll get that once I get home today.
http://cboard.cprogramming.com/cplusplus-programming/118290-program-wont-execute.html
This page seems to describe s the problem you are having. The issue there is with Dev-C++ but suggests to me that you may need to update GCC.
Ok ok, so after digging through various solutions to no avail, I finally gave in and just uninstalled AVG. And now it all works just fine.

It's weird because I've always used AVG and never had any issues with it. Not sure what sparked it to misbehave to the point where I couldn't run any program.

Guess it's time to go get Kaspersky. I always hear good things about it, but never wanted to pay for it.
I'm a bit surprised that AVG was indeed the problem.
Anyway, you could try Microsoft Security Essentials, which is also free (you only need a genuine Windows).
http://windows.microsoft.com/mse
Pages: 12