C++ .exe/.app

Ok so this will probably make me sound like the biggest noob in this forum BUT its a beginners forum right? So my question was, if for example, I wanted to make fahrenheit to celcius and vise vera program for my school friends to use (yes its not the most exciting program to use and they have web tools to do this but this program was off the top of my head so dont think of me even lower for thinking of that program), how could I make it so it was a .exe program for windows, and a .app file for mac. Please dont get me wrong, I am not asking how to make native programs, I am simply asking instead of making them compile the code to run my applications how can I make it so the program is a .exe file and whenever they want to use it they just run the program with no compiling needed.

Thanks for your time

Arcadiu
Download gcc/gnu for Mac and compile it with an .exe extension

g++ helloworld.cpp -o hello.exe

Then give your friends the program.
bingo! thankyou very very much!!

were do i write g++ hellowworld.cpp... is that in terminal?

sorry to say this but, where do i download gcc/gnu

yes you will be thinking 'google it noob' but i just typed in gcc/gnu mac and it didnt come up with any positive sites only things like sourcefourge ect
Last edited on
Yep.
You may have to configure gcc. If its like linux you don't need too. (I don't know, I have never used a mac)

If you do, google a tutorial on setting up gcc for a mac.

EDIT: http://www.tech-recipes.com/rx/726/mac-os-x-install-gcc-compiler/

Another Link: http://macosx.com/forums/mac-os-x-system-mac-software/16796-how-install-gcc.html
Last edited on
Thanks very much :) You seem to be helping me a lot or correcting me :)
A little side note:
If you are not sure about something, say so.

Incorrect info never helped anyone. ; )
Last edited on
lol aye I just use the knowledge I know to help others but obviously I dont no my onions like you do :)

Hmm sorry to seem like a complete ass clown but I still cant compile my C++ code into a .exe file? I have gcc/gnu installed but what then??
Type "g++" into the terminal and see what happens. If it says no input files then you are all set up. If it says unrecognized command, then you have to configure gcc.
ok so how did i make my c++ code a .exe file?? sorry i dont think the guides told me that

EDIT: I am all set up for the g++ thingy too
Last edited on
Topic archived. No new replies allowed.