Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 956805
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T00:35:50+00:00 2026-05-16T00:35:50+00:00

Problem Description: Occassionally when debugging, I get the following error. I’m using visual studio

  • 0

Problem Description:

Occassionally when debugging, I get the following error. I’m using visual studio 2010:

1>------ Build started: Project: projectName, Configuration: Debug Win32 ------
1>LINK : fatal error LNK1104: cannot open file 'C:\Projects\projectName\Debug\projectName.exe'
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

Note that projectName is the name of my project. The error occurs when I debug, make changes, and debug again (after doing all of that, the above error shows up instead of running the program a second time).

Steps to replicate:

  1. Create a new empty c++ project, and add a file called “main.cpp” to the sources folder
  2. Copy the following code into main.cpp:

    int main(){
        return 0;
    }
    
  3. Click the green debug arrow button, and note the successful run of the program. Ensure it is closed and that the debugging session is over. Open the process explorer and ensure the exe for the project is no longer running (if it is, wait until it closes).
  4. Erase the contents of main.cpp and replace it with this code (or any other code that will compile properly which is different than the code used above):

    #include<iostream>
    int main(){
        std::cout<<"hello\n";
        return 0;
    }
    
  5. Click the green debug arrow button. Instead of running the program, the IDE will show the fatal LNK1104 error. You’ve now replicated the problem.

Any ideas on how to fix this?


Additional Details:

  • If I try to change the permissions or delete projectName.exe after the error has occured, an error popup shows up which says:

    You need permission to perform this action

    You require permission from the computer’s administrator to make changes to this file

  • I am using windows 7.

  • The account I’m using is an admin account, but this issue also occurs exactly the same when I use a non-admin account.

  • For 2-3 minutes after the error occurs, I cannot rebuild or debug the project, but after approximately that amount of time, I am able to start at the beginning of the repro steps again.


UPDATE: BOUNTY

Anyone who can offer a solution that fixes the problem gets 100 rep 🙂

I’ve tried stopping all services, processes and applications that could be interfering with VC++ accessing the file, and the issue is still occuring. Also, running vc++ as an admin does not help.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T00:35:51+00:00Added an answer on May 16, 2026 at 12:35 am

    This is most likely a bugfeature of the Windows Explorer.

    Make sure that the .exe file is NOT selected/focused in the Windows explorer. On Vista i often get LNK1104-errors, when the executable file is selected in the Windows Explorer during linking.

    If that does not help, check that no other program has “selected” the file.

    EDIT:
    This program can show you which process has locked your file (the pages contains some links to other “unlock” tools aswell)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

The following is the problem description: let c[n] be the catalan number for n
When I try to compile to following code, I get two errors: Description Resource
Problem description: The setup is executing Ant build script with TestNG target, which then
Problem overview: When using Eclipse Ganymede with the Web Tools Platform the project gets
Problem Description In my yacc parser grammar, I have the following rules and corresponding
Problem Description I'm using Expat with a custom C++ wrapper, which I already tested
Problem Description I receive an non-descriptive "error" message whenever attempting to call an HTML
Problem description: I need to implement 2 classes like following: class A1 { common_method1();
Following is my problem description A B C D 1 H1 H2 H3 H4
The following is the problem description: The history teacher at your school needs help

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.