Micro and Nano Mechanics Group

Running MD++ on Mac OS

Saad Bhamla and Yanming Wang

Basically two things need to be checked before running MD++. The first is the system should support the X window; and the second is the system should be able to compile the codes. For the latest Mac OS (lion), it automatically supports X window function. You may simply verify it by typing the following command in the terminal window.

xclock

If a clock is popped out, it means your system can open X window.

Next, several other steps should be taken for successfully compiling MD++ on Mac OS.

1. Install the developer tool called Xcode from App store. This software is free for Mac OS Lion.

2. Start Xcode and choose the Preferences option from the menu.

3. After open the Preferences window, go to the Downloads section and download Command Line Tools.

4. Go to the directory where MD++ is installed and type the following command to start compiling. Please check the related manual M01 Intro to MD++.

$ make all SYS=mac build=R

The compiling should work. If by any chance the error is reported as below, the following part may help.

bash: make: command not found

Check the directory where the make is in. Typically, the directory is shown as follows. Or you can find the make file first, then use the pwd command to find its directory.

/Applications/Xcode.app/Contents/Developer/usr/bin

Then go to the MD++ directory and type the following command to add that path to your current path.

PATH = $PATH:/Applications/Xcode.app/Contents/Developer/usr/bin