I installed Visual Studio 2010. I wrote a simple code which I\'m sure is correct but unfortunately, when I run the code, I get the error below.
Here is my code:
I had a same problem and i could fixed it! you should add C:\Program Files (x86)\Microsoft SDKs\Windows\v7.1A\Lib\x64 for 64 bit system / C:\Program Files (x86)\Microsoft SDKs\Windows\v7.1A\Lib for 32 bit system in property manager-> Linker-> General->Additional library Directories
maybe it can solve the problem of somebody in the future!
I have recently not used VS 2010.
Does your application really build correctly?
To get more control in VS 2010 C++ Express
, you can check menu item "Expert Settings
" under Tools>Settings
to get a Build' menu
.
After clicking Build->Build Solution
(or Rebuild
), you may verify in Output
window (View->Outout
), if your application is compiling and linking correctly.
Sources :
Hope it helps.
I got this problem during debug mode and the missing file was from a static library I was using. The problem was solved by using step over instead of step into during debugging
Since this thread is one of the top results for that error and has no fix yet, I'll post what I found to fix it, originally found in this thread: Build Failure? "Unable to start program... The system cannot find the file specificed" which lead me to this thread: Error 'LINK : fatal error LNK1123: failure during conversion to COFF: file invalid or corrupt' after installing Visual Studio 2012 Release Preview
Basically all I did is this:
Project Properties
-> Configuration Properties
-> Linker (General)
-> Enable Incremental Linking -> "No (/INCREMENTAL:NO)"
I know this is an old thread, but for any future visitors, the cause of this error is most likely because you haven't built your project from Build > Build Solution
. The reason you're getting this error when you try to run your project is because Visual Studio can't find the executable file that should be produced when you build your project.
As others have mentioned, this is an old thread and even with this thread there tends to be different solutions that worked for different people. The solution that worked for is as follows:
Right Click Project Name > Properties
Linker > General
Output File > $(OutDir)$(TargetName)$(TargetExt) as indicated by @ReturnVoid
Click Apply
For whatever reason this initial correction didn't fix my problem (I'm using VS2015 Community to build c++ program). If you still get the error message try the following additional steps:
Back in Project > Properties > Linker > General > Output File >
You'll see the previously entered text in bold
Select Drop Down > Select "inherit from parent or project defaults"
Select Apply
Previously bold font is no longer bold
Build > Rebuild > Debug
It doesn't make since to me to require these additional steps in addition to what @ReturnVoid posted but...what works is what works...hope it helps someone else out too. Thanks @ReturnVoid