Sunday, August 2, 2009

Help with C++ Compiler?

Hi, how can i compile a C++ program were my friends can use it without


having to download any additional software.





I have been using microsoft visual studio 2008 but the only way my friends are


able to execute that file is by downloading visual studio also.





- What is the best compiler to use for C++ and were can i find some help


getting it set up, because i used the code::blocks compiler early today and it


seems as though you have to have a diffrent compiler like microsoft 2008 or


the gnu compiler... All i want is some information like that.





- also how do you add an icon to your C++ file that you compiled.





My Friends and Family are either running windows XP or Vista so my main goal is to


get a compiler to were there operating system already contains the nessessary files


to run the compiled C++ program.





I am farly new to C++ if you can not tell.





Thanks in advance.

Help with C++ Compiler?
You do have everything. VS is all you need.





In VS go to the build options. In the options, set the build to "release" and not debug.





If you are writing a MFC program (don't think so; however, just in case), look under the project settings tab build configuration and set to "statically linked MFC library" instead of "dynamically linked." This second step will bind the MFC library to your exe (this one is different on different win machines).





Probably step 1 will solve your problem.





Now, just copy the ".exe" file from your \release\ folder and give it away. You're good to go.





Good luck.





EDIT: just saw the icon reference. In the project resource viewer, open the icon folder. There should be a program icon already in the folder--edit away. Or you can add a new one and do some whiz bang graphics with it!
Reply:You are really lost. Try worrying less for a start. Then know this...once you compile a C++ program, you can run the exe file on almost any computer that is MS compatible.





Try Visual Studio
Reply:You should be able to compile a program on VS express that runs on any Windows computer. You need to be sure you're building a .exe file. In VS 2008 it may require that .Net 3.0 or later is required on the target system (your family's and friend's) They can download this from Microsoft. Also you can build debug or release version in VS you should build release versions for other computers. If your program still require them to have VS to run then you need to look at your build settings and references. Make sure that you are building an exe file and that the references don't refer to something you aren't expecting in the target environment.


No comments:

Post a Comment