Tuesday, 15 May 2018

c++ - Build Failure? "Unable to start program... The system cannot find the file specificed"



Hello I am a beginner trying to build a simple win32 console application in effort to follow a youtube tutorial and I keep running into this issue when trying to use VS 2010 express.




EDIT: Here is the youtube video that I am following along, the code is from 14:52 in the video.
/watch?v=URNZq50X35s&list=PLFBF66E730A679479&index=1



link to error img:
http://i.imgur.com/AVD06aa.png



settings img:
http://i.imgur.com/AvMgDxt.png




I have googled for more hours then I care to admit now in an effort to try and solve this problem.. I cannot find a fix to this issue.
Here is the code in the img:



EDIT 2: Revised code due to suggestions just to cross out potential issues



EDIT 3: When rebuilding solution output from build shows:



1>------ Build started: Project: Learning1, Configuration: Debug Win32 ------
1>LINK : fatal error LNK1123: failure during conversion to COFF: file invalid or corrupt
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========




EDIT 4: SOLUTION FOUND!



Alright I finally found the problem and the solution.



Problem:
LINK : fatal error LNK1123: failure during conversion to COFF: file invalid or corrupt



Solution was found at another article on stackoverflow, a lovely site:
Error 'LINK : fatal error LNK1123: failure during conversion to COFF: file invalid or corrupt' after installing Visual Studio 2012 Release Preview




Disabled incremental linking and programs will actually run now in VS 2010 express.



Thanks for all your attempts at helping me. Very much appreciated.



(I can't answer my own question for 7 hours because I am new to the site. What a brilliant system.. so this edit will have to do.)



<3



#include 


using namespace std;

int main()
{

for (int i = 0; i < 5; i++)

{
cout << i << endl;

}

cout << "end of loop v.2" << endl;

return 0;
}


I have confirmed that this code runs in Code Blocks.




Any and all help will be greatly appreciated.



(If you are wondering why I want to use VS 2010 over code blocks, I simply would prefer Vs 2010 so I can follow the tutorial more appropriately.)



Thank you.


Answer



Alright i finally found the solution.



Problem: LINK : fatal error LNK1123: failure during conversion to COFF: file invalid or corrupt




Solution was found on another article at stackoverflow, a lovely site: Error 'LINK : fatal error LNK1123: failure during conversion to COFF: file invalid or corrupt' after installing Visual Studio 2012 Release Preview



Disabled incremental linking and programs will actually run now in VS 2010 express.


No comments:

Post a Comment

casting - Why wasn&#39;t Tobey Maguire in The Amazing Spider-Man? - Movies &amp; TV

In the Spider-Man franchise, Tobey Maguire is an outstanding performer as a Spider-Man and also reprised his role in the sequels Spider-Man...