Compiling Megahal on mac

How to compile Megahal on Apple Platform with Xcode

Here is a step by step in picture - how to compile Megahal (already mention on this blog) with xcode.

You will find Megahal source at http://sourceforge.net/projects/megahal/files/

  • Step 1 : create a new project as "command line Utility" and "standard tool" :

  • Step 2: open megahal.h, megahal.c and main.c as source files (forget the debug.c file it isn't necessary and it won't compile (because of many errors))

  • Step 3 : In file megahal.c - put in comment the include "debug.h" - so it won't try to link with this file we don't want.
  • Step 4 : in main.c - put in comment the line include malloc.h - and instead add include "/usr/include/malloc.h" - then as in step 3 put in comment the call to "debug.h"
  • Step 5 : Go ahead and press Build and Go - in the build folder you will get the megahal-mac (assuming you named the project as such) and you can then use of the Aritificial Intelligence to play with (I choose Aliens - I like to speak with Bishop!)
That was easy!

No comments:

Post a Comment

Related Posts with Thumbnails