Thread: "Game Over" program build fail?

  1. #1
    Registered User
    Join Date
    Jan 2013
    Posts
    3

    "Game Over" program build fail?

    Hello,

    I just bought a book on game programming with c++ and one of the first things you do is make the "Game Over" console program. I'm using Microsoft Visual c++ 2012 Express. I follow what the book says and type in the code for the program. The code:

    Code:
    //Game Over
    Code:
    //A first C++ program
    
    #include <iostream>
    
    int main()
    {
    std::cout << "Game Over" << std::endl;
    return 0;
    }


    After I type that in, I click the "debug" tab and then click "build solution" and I end up getting this error:

    1>------ Build started: Project: game_over, 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 ==========

    I tried making a whole new file and typing the code in again and it still does this. I'm using the Win32 Console Application template as that it was the book told me to use. Can anyone help me as to why it's failing?

    Thanks,
    ~mdbay

  2. #2
    SAMARAS std10093's Avatar
    Join Date
    Jan 2011
    Location
    Nice, France
    Posts
    2,694
    The code is ok. something wrong with the settings. I haven't use VS yet so I can't say more :/

    Since you are new here, notice that there is a Game programming thread !!
    But this post is ok to be here (if not in a visual studio forum, if one exist).

    Also, welcome to the forum
    Code - functions and small libraries I use


    It’s 2014 and I still use printf() for debugging.


    "Programs must be written for people to read, and only incidentally for machines to execute. " —Harold Abelson

  3. #3
    Registered User
    Join Date
    Jan 2013
    Posts
    3
    Alright, thanks.

  4. #4
    Registered User
    Join Date
    Nov 2012
    Posts
    1,393
    Searching the internet for the error message produced this result which seems like it will give you some tips

    visual studio 2010 - LINK : fatal error LNK1123: failure during conversion to COFF: file invalid or corrupt after installing VS2012 release preview - Stack Overflow

  5. #5
    Registered User
    Join Date
    Jan 2013
    Posts
    3
    Quote Originally Posted by c99tutorial View Post
    Searching the internet for the error message produced this result which seems like it will give you some tips

    visual studio 2010 - LINK : fatal error LNK1123: failure during conversion to COFF: file invalid or corrupt after installing VS2012 release preview - Stack Overflow
    Thanks! All I had to do was install SP1 for VC and it fixed the problem.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 2
    Last Post: 08-19-2012, 06:15 AM
  2. can "this" fail?
    By confuted in forum C++ Programming
    Replies: 4
    Last Post: 07-06-2003, 02:03 AM
  3. "itoa"-"_itoa" , "inp"-"_inp", Why some functions have "
    By L.O.K. in forum Windows Programming
    Replies: 5
    Last Post: 12-08-2002, 08:25 AM
  4. "CWnd"-"HWnd","CBitmap"-"HBitmap"...., What is mean by "
    By L.O.K. in forum Windows Programming
    Replies: 2
    Last Post: 12-04-2002, 07:59 AM