CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5
  1. #1
    Join Date
    Mar 2013
    Posts
    4

    Share C++ Program

    How can I make a C++ program for someone who doesn't have Visual Studio? I want to make a program for someone who doesn't have Visual Studio but I don't know how the program will work on that computer.

    Is there a way the output can work without being used in Visual Studio?

  2. #2
    2kaud's Avatar
    2kaud is offline Super Moderator Power Poster
    Join Date
    Dec 2012
    Location
    England
    Posts
    7,822

    Re: Share C++ Program

    Create an .exe file from Visual Studio. The .exe file can be used on any Windows computer that supports the API calls used.
    All advice is offered in good faith only. All my code is tested (unless stated explicitly otherwise) with the latest version of Microsoft Visual Studio (using the supported features of the latest standard) and is offered as examples only - not as production quality. I cannot offer advice regarding any other c/c++ compiler/IDE or incompatibilities with VS. You are ultimately responsible for the effects of your programs and the integrity of the machines they run on. Anything I post, code snippets, advice, etc is licensed as Public Domain https://creativecommons.org/publicdomain/zero/1.0/ and can be used without reference or acknowledgement. Also note that I only provide advice and guidance via the forums - and not via private messages!

    C++23 Compiler: Microsoft VS2022 (17.6.5)

  3. #3
    Join Date
    Oct 2006
    Location
    Sweden
    Posts
    3,654

    Re: Share C++ Program

    Unless you link the runtime statically the end user have to install the runtime to be able to use the exe.
    Debugging is twice as hard as writing the code in the first place.
    Therefore, if you write the code as cleverly as possible, you are, by
    definition, not smart enough to debug it.
    - Brian W. Kernighan

    To enhance your chance's of getting an answer be sure to read
    http://www.codeguru.com/forum/announ...nouncementid=6
    and http://www.codeguru.com/forum/showthread.php?t=366302 before posting

    Refresh your memory on formatting tags here
    http://www.codeguru.com/forum/misc.php?do=bbcode

    Get your free MS compiler here
    https://visualstudio.microsoft.com/vs

  4. #4
    Join Date
    Nov 2000
    Location
    Voronezh, Russia
    Posts
    6,620

    Re: Share C++ Program

    Quote Originally Posted by gamesun View Post
    How can I make a C++ program for someone who doesn't have Visual Studio? I want to make a program for someone who doesn't have Visual Studio but I don't know how the program will work on that computer.

    Is there a way the output can work without being used in Visual Studio?
    Afraid the question implies a silver bullet answer like working always even when having your brains turned off while the real answer always is "have your brains always turned on and understand what you do".
    Best regards,
    Igor

  5. #5
    Join Date
    May 2009
    Posts
    2,413

    Re: Share C++ Program

    Quote Originally Posted by gamesun View Post
    How can I make a C++ program for someone who .....
    Here's some information on how it can be done from within Visual Studio.

    http://msdn.microsoft.com/en-us/library/wtzawcsz.aspx

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured