Thread: Running program on other computers

  1. #1
    Registered User
    Join Date
    Aug 2006
    Posts
    62

    Running program on other computers

    How can I build a program in Visual C++, so it would work on other computers and operating systems too? I have tested my program and it often gives some kind of side-by-side configuration error. What files do I necessarily need to add?

  2. #2
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    You need the target machine to install the Visual C++ runtime. Then it will work for every program you try to run.
    I have the runtime for VS 2008, if you need it. Unless you use VS 2005 or earlier, it's the one you need.
    This applies only to Windows, of course.
    VC++ won't run on any other platform than Windows.
    Last edited by Elysia; 06-02-2008 at 09:12 AM.
    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
    Apr 2008
    Posts
    890
    You mean how to run Windows programs on the Mac or Linux boxes?

  4. #4
    Registered User
    Join Date
    May 2008
    Posts
    5
    If (you will run the program same operaing systems)
    it is not problem just install required runtimes
    else
    you have to look cross libraries that have multi operating system implementation like cygwin or socket libraries

  5. #5
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    Quote Originally Posted by ibaydan View Post
    If (you will run the program same operaing systems)
    it is not problem just install required runtimes
    else
    you have to look cross libraries that have multi operating system implementation like cygwin or socket libraries
    But even cross-platform libraries still require the code to be compiled for the particular OS - most OS's do not share the very basic things like:
    - Executable file format and/or load address.
    - DLL/Shared libraries to access the OS itself.

    So if you want to move from one version of Windows to another, that's easy. Moving from Windows to Linux or Apple, you have to compile the code over again - and if the code isn't written with at least some portability in mind (or really trivial), it probably won't compile.

    --
    Mats
    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

  6. #6
    Registered User
    Join Date
    May 2008
    Posts
    53
    Unless you compile it as C++/CLI, in which case your executable may be able to run unmodified on a Linux box with mono. Which I've never tried.

    --
    Computer Programming: An Introduction for the Scientifically Inclined

  7. #7
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    Posts
    8,895
    You'd have to be very careful to avoid all unmanaged code.
    All the buzzt!
    CornedBee

    "There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
    - Flon's Law

  8. #8
    Registered User
    Join Date
    May 2008
    Posts
    53
    Yeah. It was more of a theoretical possibility...

    --
    Computer Programming: An Introduction for the Scientifically Inclined

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Finding Program Running Time
    By pf732k3 in forum C Programming
    Replies: 6
    Last Post: 03-18-2008, 01:56 PM
  2. Running my program in the background
    By shoobsie in forum Windows Programming
    Replies: 4
    Last Post: 10-09-2005, 02:38 AM
  3. Replies: 3
    Last Post: 09-05-2005, 08:57 AM
  4. Why is my program running away?
    By badkitty in forum C++ Programming
    Replies: 4
    Last Post: 09-19-2001, 04:27 PM
  5. Running program
    By muffin in forum C Programming
    Replies: 5
    Last Post: 08-30-2001, 10:57 AM