Compiling Erlang on Mac
Posted by Alberto - 05/11/09 at 11:11:59 pmFirst of all you need to install XCode, because you will need GCC compiler. These are the steps I followed:
1. Download the latest version of Erlang. In my case, it was R13B02-1, so I got a file named otp_src_R13B02-1.tar.gz
2. After decompressing the file:
$ cd otp_src_R12B-2
$. /configure
$ make
$ sudo make install
These are the standard steps, but I had a problem with the “make” command. I got the following error:
gen/wxe_events.cpp: In function ‘void initEventTable()’:
gen/wxe_events.cpp:277: error: ‘wxEVT_COMMAND_AUINOTEBOOK_TAB_MIDDLE_DOWN’ was not declared in this scope
gen/wxe_events.cpp:278: error: ‘wxEVT_COMMAND_AUINOTEBOOK_TAB_MIDDLE_UP’ was not declared in this scope
gen/wxe_events.cpp:279: error: ‘wxEVT_COMMAND_AUINOTEBOOK_TAB_RIGHT_DOWN’ was not declared in this scope
gen/wxe_events.cpp:280: error: ‘wxEVT_COMMAND_AUINOTEBOOK_TAB_RIGHT_UP’ was not declared in this scope
gen/wxe_events.cpp:281: error: ‘wxEVT_COMMAND_AUINOTEBOOK_PAGE_CLOSED’ was not declared in this scope
gen/wxe_events.cpp:282: error: ‘wxEVT_COMMAND_AUINOTEBOOK_DRAG_DONE’ was not declared in this scope
gen/wxe_events.cpp:283: error: ‘wxEVT_COMMAND_AUINOTEBOOK_BG_DCLICK’ was not declared in this scope
make[4]: *** [i386-apple-darwin9.8.0/wxe_events.o] Error 1
make[3]: *** [release] Error 2
make[2]: *** [release] Error 2
make[1]: *** [release] Error 2
make: *** [install.libs] Error 2
The solution was to build Erlang without wxwidget support, so the steps I followed were:
$ cd otp_src_R12B-2
$. /configure
$ touch lib/wx/SKIP
$ make
$ sudo make install
Fix the Home and End keys in OS X
Posted by Alberto - 11/07/09 at 04:07:46 pmThere is one thing I dont like about Mac OS X: the behaviour of the Home, End, PagUp and PagDown keys. I you want the same behaviour than a Windows or Linux computer, open a text editor and write this:
{
“\UF729″ = “moveToBeginningOfLine:”;
“$\UF729″ = “moveToBeginningOfLineAndModifySelection:”;
“\UF72B” = “moveToEndOfLine:”;
“$\UF72B” = “moveToEndOfLineAndModifySelection:”;
“\UF72C” = “pageUp:”;
“\UF72D” = “pageDown:”;
}
Save the file as DefaultKeyBinding.dict into your ~/Library/KeyBindings directory and reboot your Mac.
Showing hidden files in Leopard
Posted by Alberto - 03/07/09 at 01:07:11 amI’ve found a very useful widget. It adds a button to your dashboard to easily show or hide the hidden files in your system. Install it, press “Show”, and you will see your hidden files in Finder.

How to edit PATH variable on Mac
Posted by Alberto - 23/05/09 at 10:05:19 pmIf you need to change your PATH variables (or another environment variable, as CLASSPATH) on a Mac OS X, you need to edit a file called .profile located in your home directory. Open a terminal window and type:
open -e ~/.profile
In case you dont have a .profile file, you have to create it:
touch ~/.profile
You have to include a line like this:
export PATH=(path-you-want-to-add):$PATH
For example, lets imagine you want to add the file whatever.jar, located in your Documents folder. You would write:
export PATH=~/Documents/whatever.jar:$PATH
Easy, isnt it?
Powered by WordPress with GimpStyle Theme design by Horacio Bella.
Entries and comments feeds.
Valid XHTML and CSS.


