Thread: Visual Studio 2010 .exe help

  1. #1
    Registered User
    Join Date
    Sep 2010
    Location
    Boston, MA
    Posts
    97

    Visual Studio 2010 .exe help

    So I just finished my first game and wanted to put it on another computer in my house, And when I moved the .exe it said that I need the Microsoft Framework. It is a very simple game just a console game so there is no sound or video at all. Just wondering if you can make it so that the compiler puts those into the .exe.

    Thanks

  2. #2
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    First, switch to Release configuration. Then, in project settings, under C/C++ -> Code generation -> Runtime Library, select Multi-threaded (/MT).
    Note that this may bloat the size of your executable.
    That is all that is required to run a C/C++ executable on another machine without runtime. If you chose some .NET alternative, it will still require the .NET framework.
    Another option is to install the Visual C++ 2010 runtime on the target computer. It only needs to be done once.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  3. #3
    Registered User
    Join Date
    Sep 2010
    Location
    Boston, MA
    Posts
    97
    Thank you, works now

  4. #4
    Registered User
    Join Date
    Jan 2011
    Posts
    31
    While we're on the subject, what if you have code referencing libraries from DirectX or XNA. Do those libraries get compiled into the .exe?

  5. #5
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    DirectX is a series of stand-alone DLL files, so no, they are not. The target machine needs DirectX installed.
    The same applies to XNA. They are also stand alone files.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. LDAP Query
    By Travoiz in forum C++ Programming
    Replies: 0
    Last Post: 08-13-2009, 02:58 PM
  2. We Got _DEBUG Errors
    By Tonto in forum Windows Programming
    Replies: 5
    Last Post: 12-22-2006, 05:45 PM
  3. C++ std routines
    By siavoshkc in forum C++ Programming
    Replies: 33
    Last Post: 07-28-2006, 12:13 AM
  4. load gif into program
    By willc0de4food in forum Windows Programming
    Replies: 14
    Last Post: 01-11-2006, 10:43 AM
  5. Learning OpenGL
    By HQSneaker in forum C++ Programming
    Replies: 7
    Last Post: 08-06-2004, 08:57 AM