One of the simplest ways to compile your program is using the program g++. You will do this using the command line (terminal). Typically, you will do the following steps:
1. Open up the terminal, as well as some kind of editor (like word pad). You can alternatively do this from the command line, but use whatever you're comfortable with.
2. Edit/change your program (for example, my.cpp).
3. Save your changes, remembering the folder that you put it in. For simplicity, you may want to create a MyCProgram folder directly in your hard drive (root directory)
4. From the terminal, you will make sure you're in the same directory as your .cpp file, then type g++ -o myprogram my.cpp
5. The step above compiles my.cpp (source code) into an executable called 'myprogram'. You can then run it by typing ./myprogram
6. Go to step 2 until your program works.
You may want to check out the Mac site for a program called Eclipse. It seems to be pretty powerful, and I think it's free.
Subscribe to:
Post Comments (Atom)
Carlo Cipolla's Laws of Stupidity
"By creating a graph of Cipolla's two factors, we obtain four groups of people. Helpless people contribute to society but are...
-
To install pngwrite we need to install to helper library before we install pngwriter. 1. libpng 2. freetype2 We can use fink or macport to i...
-
"By creating a graph of Cipolla's two factors, we obtain four groups of people. Helpless people contribute to society but are...
-
Use 'Disk Utility' application to format the USB drive in MS-DOS (FAT) format Download the windows ISO file from the Windows websit...
No comments:
Post a Comment