Question:
how do a run a c++ executable without a compiler?
2011-05-13 15:39:17 UTC
Hi, I would like to make a c++ program on my pc with visual studios or some other IDE/compiler and then give the executable program to my friend so he can use the program. Will he be able to use my program even though he doesn't have a c++ compiler or an IDE
Thanks
Four answers:
The Phlebob
2011-05-13 15:45:30 UTC
Maybe. The same (or a closely related -- Windows Vista and Windows 7, for instance) operating system is a good start, but the machine must also have the appropriate runtime libraries installed.



He won't need the compiler or the IDE, though.



Hope that helps.
question asker
2011-05-13 17:58:21 UTC
You're jumping ahead of yourself. First you need to decide what compiler and possibly framework you want to use. Then you can find out what files (dependencies) need to be distributed with your program. Or what is required on your friends computer. To give you an example I'm developing some software in Qt framework (C++) and compiling with mingw compiler. I need to distribute 3 mingw .dll files + a couple of Qt package files for the program to be able to run on another windows machine (that doesn't have Qt and mingw installed). On the other hand if you're using .NET then the user will need the .NET framework runtime installed (a bit like requiring the java runtime installed to run java programs). So my advice is choose what compiler/IDE/framework you are going to use, and only then find out how to go about distributing. And bear in mind that you will only know for certain if your program works right on another machine until you actually test it on another machine.
2016-10-19 14:02:07 UTC
it extremely relies upon on many stuff. case in point, in case you assemble a C application using swifter C and resultant EXE document could be carried out yet another gadget of abode windows (not 7) whether swifter C isn't available. swifter C makes use of static linking subsequently exe information are self finished. So, they run on different abode windows/dos machines. yet not below Linux. some compiler created dynamically linked executables, so as that they'll run comparable form of machines on condition that DLL is likewise available.
Jared
2011-05-13 15:43:33 UTC
As long as it is the same operating system, then yes. Does your program contain a GUI that your friend can use or will he need to remember the command line arguments? Or does it do just one thing and you click it once and its done?


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...