AVG says my programs are viruses

When i do a virus scan using AVG it says that my programs are viruses and doesn't let me open them, I'm using codeblocks and it says that the .exe file in debug/bin is a virus. Why is this? it even does it for "Hello World" programs.
closed account (S6k9GNh0)
I bet you use use system() somewhere.

http://cplusplus.com/articles/j3wTURfi/
No, Here's an example of a program that it happens to.

#include <iostream>

int main()
{
std::cout << "Hello world!\n\nHello\nWorld!\n" ;
return 0;
}


and when i try to open the debug file it says "threat name: Trojan Horse Agent3.BLKR
Try to scan file in online antivirus. As your computer can have a virus that infects exe files.
AVG has been known to detect false positives in c++ code for a while now.
(2009 is the earliest date I can remember)
Try adding system("pause") to the code and see if that helps.
http://www.virustotal.com/file/e53f2b147127ac789ef1b33319b7b5b4a77f458172290de07109de8bedcbd72a/analysis/1333732928/
Yet another fine demonstration of why the most ideal habitat of any kind of anti-virus software is a trash can.
So I guess I just need a new antivirus software, any recommendations on a good free one? Also I did an online scan using bitdefender.com and it said there were no infections
Last edited on
Maybe avira?
I use linux :D
some anti virus software have had the misfortune of being programmed into picking up cpp documents such as AVG i have no idea why they do this but they do it... i use norton on my windows/linux and they are better about this.
Shinigami most likely is the one that nailed it. I use AVG and have no issues with software or source code. The OP's PC is infected with an .exe-infecting virus, yielding infected exe's and AVG is picking them up.
Hardly, unless I got the same kind of malware. Compiled and submitted to virustotal on a 10 minute old install of Windows 8, no less.
I haven't coded in my home pc for a while now, so I really can't say I have recent experience. Maybe later on. Currently busy migrating my work PC.
I switched to Avira, and everything is working now.
Athar wrote:
Yet another fine demonstration of why the most ideal habitat of any kind of anti-virus software is a trash can.


Amen. Virus scanners are worse than any virus. They have given me countless hours of grief before I realized I didn't need them.

CyberYeti wrote:
any recommendations on a good free one?


The best protection against computer viruses is common sense. Don't go to obviously malicious sites, don't run random exes you get off the net, etc.

What's more, it's completely free, and unlike virus scanners doesn't destroy/cripple your machine in the process.
Also, the constant scanning that anit-virus software like to do just places more use on the hard disk bringing it closer the the end of its life than is needed.
And they suck up laptop battery life like nobody's business.
If you're using Windows, I'd recommend Microsoft Security Essentials and Malwarebytes Anti-malware. MSE is great for live protection and MBAM is ideal for regular scans.

Edit: They're also both free.
Last edited on
If you're using Windows, I'd recommend Microsoft Security Essentials and Malwarebytes Anti-malware. MSE is great for live protection and MBAM is ideal for regular scans.


I would not recommend Microsoft Security Essentials. My friend had it and his computer was easily infected. When he sent a video online (youtube, skype video) wasn't able to use a computer. The processor was used 100%. Reinstalled antivirus to avira and it found a virus. Fixed problem and all good now.

Precaution can reduce the probability of virus, but can not avoid them. You can get virus even on this page if someone hacked it and puts a bad code.
closed account (S6k9GNh0)
That's generally incorrect. Well over a majority of what's considered a "virus" isn't much more than a malicous program you, the user, allowed to run. A virus can't be downloaded and excecute itself, and browsers now adays are quite aware of what's sketchy and what isn't (certain Javascript, Java applets, and WebGL are all given warnings by default when executed in Firefox). One anti-virus might have more up-to-date definitions of a virus but it generally shouldn't matter. You shouldn't rely on your anti-virus to protect you.

When I used Windows (back in the 2000 to Windows Vista days), I never once used a passive anti-virus. I would run a monthly scan to find if anything is found sketchy and then allow me to take action. Out of the 7 years I used it (a mixture of AVG, Avira, and a few others I tried but didn't take advantage of passive scans), I never once found a virus.

I didn't use a passive AV on Windows and I don't care to use one on Linux.
Last edited on
Topic archived. No new replies allowed.