all about macs

Name:

This is an attempt to share the daily experience with my new apple imac. In doing so I will be adding some interesting information either I find on the net or create by myself. Obviously I have neither any influence nor control over any of the external links you find on this blog. Happy Reading!

Thursday, December 29, 2005

First C++ program on OSX

Installed Xcode 2 with high hopes. Unfortunately, I was lost on the way to run my first c++ program. But then I gave it a try on the Terminal using vim editor. If you are interested, here are the instructions.

It is boring to edit on vim if you have no syntax highlighting. To make it work you should create a file called .vimrc on root directory of the user.

Open the Terminal and type vim .vimrc (When you first open the Terminal you will be on the root directory of the user)

Press "I" to get to insert mode.

Type syntax on

Then press esc button and type :wq to save and exit from vim editor. Next time when you use vim to write a program syntax highlight should be active.

To create your first C++ program

Open the Terminal and type vim first.cpp

Press "I" to get to Insert Mode and type this small program.

Then press esc and :wq to save and exit from vim editor.

Next step is to compile your program. To do that

Type g++ first.cpp -o first and press Enter

This will create an executable file called "first". If you followed my instructions correctly the Terminal should be ready to execute the next command.

Type ./first and press Enter to execute the file.

You should see "Hello World!"

Hope you enjoyed running your first c++ program on osx.

Novice

History

I have found some interesting articles about the history of Apple and MacOS. This article is interesting for someone who would like to get a brief overview. This article is for German readers.

The history of Apple can be found here.

Some more links
Wikipedia
The Apple Museum (TAM)

Making of Machintosh
MyOldMac (English & German) - One of my favourites.

Partitioning

Original iMac came with OS X 10.4 pre-installed. My immediate thought was to change the partition scheme so that I can have one partition for OSX, one for Backups and even a third one in case if I decided to install Linux in a later stage. Unfortunately this wasn't possible with "Disk Utility" software comes with OSX. Since I have not done anything with my iMac I have decided to format the hard disk and install everything new. If this is not an option for you the tools like DiscStudio and VolumeWorks can be used but they may cost you some extra money.

First Post

On the 01/12/2005 I bought my very first apple computer. It is an iMac G5 comes with an integrated iSight camera. 2.1 GHz processor, 20’ Screen, 250GB HDD and a 8x Superdrive. Being a Linux user for a while it didn't take me too long to get use to the new system. However there were couple of things which I find different from Linux or even from Windows.

So I am trying to explore the new operating system while giving some hints and tricks, which I may find along the way. I hope this will be some kind of help to anyone visiting this site. I would be glad to hear your ideas and comments, which may helpful to other readers as well.