Trying to figure out Aquamacs and Terminal on my MacBook
I'm taking this Computer Programming class, and I'm confused with the instructions my professor gave me because I have a Mac and I didn't even have an Emacs, so I ended up downloading Aquamacs. I know how to "find" a file and give it a name and save it, but I don't know how to... compile it?.. using the terminal that came with my macbook (do i need to download another one?). After writing and saving a file named "MyFirstSource.cpp", I'm supposed to write "g++ -Wall -c MyFirstSource.cpp" on the command line(the terminal?) and check if i have any mistakes and explain the use of "-Wall" and "-c". I only got to the part of saving the file, but that was even before I had opened Aquamacs using the terminal.
I'm not trying to get my homework done for me, I just really don't know how to work the Aquamacs and the Terminal to get the answers... Just so you can have an idea of what I'm doing, after that last step, when I don't have any more mistakes in the text of the file, I'm supposed to enter "g++ -o MyFirstProgram MyFirstSource.o"... and explain in my own words what happens... Clearly, I ne开发者_Python百科ed help, so please! Anyone who has anything to say about this, your comment is welcome. (I don't need anyone to point out that I'm clueless, I know that!) Thanks! :)
- You will need to open
Terminal
which is in Applications/Utilities. This is where you invoke your compiler (g++
). Note that when you open the Terminal, you will be in your home directory, which is at/Users/yournamehere
- AquaMacs is a text editor. It opens and saves files. While it can do tons of other things, its best to not complicate the matter further. Note that when saving files, save them to your home directory (the one named after you), or somewhere where you can find them. (As an aside, your Mac already comes with emacs on the command line (the Terminal). Just type 'emacs'.)
- In order for
g++
to appear on your system, you must install XCode (Apple's Developer tool). XCode either came as an installer on your install DVD or pre-loaded on the system (however, you still must install it!). If not, it is a free download from http://developer.apple.com
All in all, it is best to sit down with someone using a Mac or a Linux machine to help you get the basics down.
精彩评论