Code::Blocks Forums

User forums => Help => Topic started by: minimildew on March 30, 2013, 09:50:18 am

Title: AVG just thought that my Hello World program was a Trojan.
Post by: minimildew on March 30, 2013, 09:50:18 am
#include <iostream>

using namespace std;

int main ()
{
    cout<<"Hey, you, I'm alive! Oh, and Hello World! \n";
    cin.get();

    return 1;
}
So I typed this out in Code::Blocks, ran it, and AVG detected it as a trojan and immediately terminated it. Should I be worried in the slightest? Or is AVG simply as retarded as I suspect.
Title: Re: AVG just thought that my Hello World program was a Trojan.
Post by: Jenna on March 30, 2013, 10:15:11 am
We have several threads about AVG and false positives in the last thre month.

Throw it away and use better av-software.
Title: Re: AVG just thought that my Hello World program was a Trojan.
Post by: minimildew on March 30, 2013, 10:20:30 am
Yeah, that's what I thought. This may sound like an incredibly retarded question, but when I run the script, it creates an application file (.exe) of about 1 mb within the file that the script is run from. Is that normal?
Title: Re: AVG just thought that my Hello World program was a Trojan.
Post by: minimildew on March 30, 2013, 10:21:26 am
And there's also a random .o file sitting in there (sorry for the double post)
Title: Re: AVG just thought that my Hello World program was a Trojan.
Post by: Jenna on March 30, 2013, 10:25:34 am
It looks like you don't know the absolute basics about compiling and linking.

This is not the correct site to teach such things (in fact it would violate our forum rules), but there are some tutorials and forums related to basic C/C++ programming questions in the web.

You should search and read them.
Title: Re: AVG just thought that my Hello World program was a Trojan.
Post by: minimildew on March 30, 2013, 10:30:04 am
Yes, I'm aware of my very limited knowledge (I'm attempting to learn, the hello world program is the first program I've created). I just wanted to know if there was any chance of danger to my PC. Thank you for your time.
Title: Re: AVG just thought that my Hello World program was a Trojan.
Post by: LauraC on June 08, 2013, 11:46:47 am
I just started learning C++, and I couldn't do anything with CB because AVG kept telling me the files were infected.  Did some research, dumped AVG, and got Avast (free).  No probs now.  =)
Title: Re: AVG just thought that my Hello World program was a Trojan.
Post by: GenesisArk on August 23, 2013, 03:22:06 am
I had that same problem, AVG thought that my C++ was a trojan. Well, I found this out after adding an exception in Avast! because it would auto-sandbox the programs. I wonder why such simple programs cause so much trouble. Here is my "Trojan" program:

Code
#include <iostream>

using namespace std;

int main() {
     cout<<"Hello world";
     cin.get();
}
Title: Re: AVG just thought that my Hello World program was a Trojan.
Post by: BlueHazzard on August 23, 2013, 05:30:31 pm
I had that same problem, AVG thought that my C++ was a trojan. Well, I found this out after adding an exception in Avast! because it would auto-sandbox the programs. I wonder why such simple programs cause so much trouble. Here is my "Trojan" program:

I don't think that the "Hello World" code is the problem, but the compiler witch create a exe. AVG (and many other av-software) think that a .exe created from a program must be a "Trojan" or "Virus"... The average dau nowadays isn't a programmer any more, but this goes into ot...

greetinga
Title: Re: AVG just thought that my Hello World program was a Trojan.
Post by: fred_76 on July 28, 2014, 10:37:09 am
Hi!

I posted a tweak to this problem. It is here :
http://forums.codeblocks.org/index.php/topic,19491.0.html

Fred