Question:
How to make an exe from c++ source?
minimalis
2010-10-27 22:56:05 UTC
I've made a program in C++ I first build it and then complied it. It was working on my computer but when I sent the exe from my \\Debug\ folder to my friend: he was not able to run it.
I'm using Visual Studio 2008. Anyone knows how to make an *.exe from my *.cpp file which can be runned on any PC not just on mine?
Thanks
Six answers:
2010-10-27 23:00:29 UTC
What is the error that it was showing?



Can you zip the whole project and send to me. (jn1717 at gmail.com)?
JoelKatz
2010-10-27 23:08:22 UTC
He needs the Visual Studio runtime. Alternatively, you can switch your project to static linking, but this is not recommended.



From my link: "The Microsoft Visual C++ 2008 Redistributable Package (x86) installs runtime components of Visual C++ Libraries required to run applications developed with Visual C++ on a computer that does not have Visual C++ 2008 installed."
baronne
2016-11-07 03:37:21 UTC
An exe document its esclusive for abode windows working device. Linux does no longer have extensions, in linux all are manage by using "very own" document naturality! its clarely u ought to study greater approximately linux, and the superb way for start up its the debian documentation (the main best for linux) C code in linux are genuine C ANSI code persist with, and differs extremedly from the different windoze code, that no longer whinge any standar! in Linux then you truly might desire to mark it as executable for compiling c code u ought to study genuine C instruction manual code a fundamentals are: a million) write a code 2) saves as code.c 2) carry mutually as is: gcc code.c -o code.o 4) chmod +x code.o 5) ./code.o those steps compiles and runs occasion code.c if u are windoze person, please don use linux, linux dont choose greater cost, linux are in simple terms for clever people ok
Aphrodite
2010-10-27 23:03:01 UTC
just make a .rar



make a new folder >>> put your .cpp file in the folder >>> make .rar of the folder using "Add to "FileName.rar" by right clicking on the folder >>> now youve created FileName.rar and just send that one to your friend! much easier and that's how I used to transfer/submit my .cpp s.



hope that helped!
doug
2010-10-27 23:46:44 UTC
I have 2003 VS, not sure if it's still the same.



Change the configuration from debug to release.



For 2003 you got to, Build -> Configuration Manager



otherwise, this link explains it



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



change that and compile it and it should work.
Rati Goldberg
2010-10-27 22:58:25 UTC
u can use devc++ from http://www.bloodshed.net/devcpp.html

works very fine.


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