1

I've been trying all day long to solve this issue and it's driving me crazy, I'm trying to debug and run my very first C++ program, Hello World, and I get the following notice:

1>------ Build started: Project: HelloWorld, Configuration: Debug Win32 ------ 1>LINK : fatal error LNK1104: cannot open file 'C:\Users\win 7\Desktop\C++ tutorials\HelloWorld\Debug\HelloWorld.exe' ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

I also get an AVG detection which says:

threat: potentially harmful program Hacktool.ABLQ object name: C:\Users\win 7\Desktop\C++ tutorials\HelloWorld\Debug\HelloWorld.exe

So I tried adding it to the exceptions list, that also didn't help, I don't get it, what's the problem then?? and how can I fix this?

Shog9
  • 156,901
  • 35
  • 231
  • 235
  • well it seems like it isn't just a hello world program, or at least not for avg. could you supply some source? – okaerin Sep 05 '13 at 11:55
  • 2
    Clean and rebuild the whole project. Try adding the folder to exception lists, not just the file. As each time you remake the exe file AVG might think it's a new file. – Neil Kirk Sep 05 '13 at 11:55
  • 2
    This guy appears to have had the same issue as you: http://stackoverflow.com/a/7313073/2750558 – Scott Sep 05 '13 at 11:58
  • 2
    Get a less annoying antivirus. – Renan Gemignani Sep 05 '13 at 12:35
  • After all I had to disable AVG temporarily, and it worked, but the problem is not solved yet, I don't want to disable AVG every time I debug or run a program; I added the whole Folder to the exception list; I tried to clean then rebuild, nothing worked. P.S: I don't know if this relevant, but the problem is only with Visual C++, but when it comes to Visual C#, for example, I have no problem with debugging/ running. – user2750466 Sep 05 '13 at 12:39

1 Answers1

3

Make sure your HelloWorld.exe is not running when compiling linking. Also Antivirus can quarantine executable during build when suspect harmful code there. Try to add the build directory in the exceptions list of your antivirus when you trust the source code you building.

Jim Jeffries
  • 9,841
  • 15
  • 62
  • 103
vasylz
  • 177
  • 1
  • 4
  • You better not disable the antivirus completely, but add the directory where you build in the list of exceptions. – lrineau Feb 19 '14 at 17:58