Produce a usable program?

Ive taken a class in C++ and played with it a little so I know the basics, but Im having a little problem. This is a very simple question that Im afraid probably has a very complicated answer. How do I write a program in C++ that I can then put onto a jump drive take to another computer and execute it without having and development software on that computer? In other words how do I write a standalone exe?
All C++ programs have to be compiled into a standalone executable to run no matter what machine you want to run them on. If you have never compiled a C++ program then you've never run one either.

closed account (S6k9GNh0)
I think he wants portability: It depends on the Operating System of course and what your application depends on. I'm making a GUI application that depends on wxWidgets which I've built statically which means the parts used in the library are copied into the executable so no DLL or outside library file is used. This is about as standalone as one can get. Of course it doesn't matter if I used Dynamic linking or static linking because I could have simply dragged the DLL where ever the original executable was placed.

In reality, all you need to make sure when you switch between computers is that the Operating System can call the executable and that the executable has all the resources it requires such as DLL files. Also, if your going to do this, I also suggest you not use OS dependent functions like inside of windows.h, even if you are switching between Windows, especially if it's moving towards an older version of Windows.
Hello,

There are no usable standalone exes that can be produced by a loner.
A tool does not matter. But still there are independent ones.
It is said C++ might be the one for assigning a meaning to the switching
circuit.
Topic archived. No new replies allowed.