Thread: Visual C++ Application ???

  1. #1
    Registered User
    Join Date
    May 2010
    Posts
    76

    Visual C++ Application ???

    I wrote a program using visual C++ that I'd like to be able to run on any windows XP machine. I took the executable from the debug folder and it doesn't work on other machines, just mine. Can someone tell me what I need to do to make my program executable for other folks.

    It is a CLR Form program using C++, I write it using visual studio 2008 express.

  2. #2
    Registered User hk_mp5kpdw's Avatar
    Join Date
    Jan 2002
    Location
    Northern Virginia/Washington DC Metropolitan Area
    Posts
    3,817
    The target computers likely must have the Visual Studio 2008 run-time libraries installed.
    "Owners of dogs will have noticed that, if you provide them with food and water and shelter and affection, they will think you are god. Whereas owners of cats are compelled to realize that, if you provide them with food and water and shelter and affection, they draw the conclusion that they are gods."
    -Christopher Hitchens

  3. #3
    Registered User
    Join Date
    Sep 2004
    Location
    California
    Posts
    3,268
    Also, you should compile the binary is "Release" mode instead of "Debug" mode before distributing it.
    bit∙hub [bit-huhb] n. A source and destination for information.

  4. #4
    Registered User
    Join Date
    May 2010
    Posts
    76
    No good I get The application failed to start becuase the configuration is incorrect, please re-install the application and try again.

    I just copy the executable from the debug folder, is this right or do i need more....Please help.

    Quote Originally Posted by bithub View Post
    Also, you should compile the binary is "Release" mode instead of "Debug" mode before distributing it.
    How do I do that? Is the binary the .cpp file?

  5. #5
    Registered User
    Join Date
    Aug 2003
    Posts
    1,218
    No the binary is the executable file. To compile something with Release configuration open the project in Visual studio. Now in one of the top toolbars you should see a dropdown that says Debug. Switch this to show Release instead and rebuild your project.

    The exe file will be in the Release folder instead. Try to copy this over, and of course installing the runtime libraries linked above if you haven't.

  6. #6
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    You need the .NET runtime installed on the target machine because CLR forms are managed.
    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.

  7. #7
    Registered User
    Join Date
    May 2010
    Posts
    76
    Thanks a lot. Nothing like writing program that only works on your PC!

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Issue with cin and strings
    By putzboy20 in forum C++ Programming
    Replies: 4
    Last Post: 05-11-2010, 08:38 PM
  2. LDAP Query
    By Travoiz in forum C++ Programming
    Replies: 0
    Last Post: 08-13-2009, 02:58 PM
  3. C++ std routines
    By siavoshkc in forum C++ Programming
    Replies: 33
    Last Post: 07-28-2006, 12:13 AM
  4. Replies: 3
    Last Post: 10-09-2005, 04:06 PM
  5. odd errors from msvc std library files
    By blight2c in forum C++ Programming
    Replies: 6
    Last Post: 04-30-2002, 12:06 AM