Thread: About the Executables produced by Microsoft C/C++ Compiler

  1. #1
    Registered User
    Join Date
    Oct 2010
    Posts
    132

    About the Executables produced by Microsoft C/C++ Compiler

    Hi, everyone. Do these executables need the .NET framework to run? Thanks in advance!

  2. #2
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    If you are compiling a C++/CLI or Managed C++, then yes.
    Otherwise, no.
    But they still require the Visual C++ runtime.
    I am assuming you are building a C or C++ project, and not any other language.
    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
    Oct 2010
    Posts
    132
    Thanks for the answer. I'm compiling single C++ programs from the visual studio command prompt. So the executables will need the Visual C++ runtime, right?

  4. #4
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    That is correct.
    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.

  5. #5
    Registered User
    Join Date
    Oct 2010
    Posts
    132
    Thanks again!

  6. #6
    Hurry Slowly vart's Avatar
    Join Date
    Oct 2006
    Location
    Rishon LeZion, Israel
    Posts
    6,788
    Quote Originally Posted by Elysia View Post
    But they still require the Visual C++ runtime.
    Depends on C-runtime linkage

    If you select static (/MT instead of /MD) you do not need the runtime to run the exe on another computer
    All problems in computer science can be solved by another level of indirection,
    except for the problem of too many layers of indirection.
    – David J. Wheeler

  7. #7
    Registered User
    Join Date
    Oct 2010
    Posts
    132
    Thanks, I'll do that!

  8. #8
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    Quote Originally Posted by vart View Post
    Depends on C-runtime linkage

    If you select static (/MT instead of /MD) you do not need the runtime to run the exe on another computer
    Yes, I forgot to mention this. My answer assumed dynamic linking, which is the default.
    You can also use static linking, which removes the runtime requirement by embedding the runtime into the executable.
    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.

  9. #9
    Registered User
    Join Date
    Oct 2010
    Posts
    132
    Nice. Thanks, vart and Elysia!

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Compiler that produces the fastest executables...
    By CommonTater in forum C Programming
    Replies: 14
    Last Post: 11-19-2011, 03:56 AM
  2. Compiler redistribution (Microsoft or Borland)
    By twinbee in forum C++ Programming
    Replies: 9
    Last Post: 11-10-2010, 09:06 AM
  3. Compiler - Microsoft Visual
    By Scarvenger in forum A Brief History of Cprogramming.com
    Replies: 2
    Last Post: 08-16-2006, 11:58 AM
  4. Microsoft C compiler
    By chinux in forum C Programming
    Replies: 5
    Last Post: 11-27-2004, 08:33 PM
  5. Free C++ Compiler from Microsoft
    By XSquared in forum A Brief History of Cprogramming.com
    Replies: 2
    Last Post: 04-18-2004, 10:26 AM