May 7, 2007

Note: Thanks to Alex Alvarado for pointing out a small error with the instructions. Also thanks to Brad Joyce for pointing our numerous other leaps in the directions.

There is some cool software called it++ which lets you write and do Matlab/Octave-like things in C++. So far I've had some trouble getting it installed.

You see, it uses blas, cblas, LAPACK, and fftw (and maybe some other stuff). Generally you'd want to have all these installed yourself before using it++, but on Mac OS X (since 10.2 I think), everything except fftw comes in the vecLib framework (which comes WITH OS X).

So, how do you get this thing running?

1) You need a fortran compiler, and apparently you won't have one by default. In theory, you can install it with Fink. That didn't work for me. I went to http://hpc.sourceforge.net/ and used his binaries . You're looking for g77 3.4. There are instructions there on exactly how to unpack the archive so that everything goes to the right place. Works great. Make sure that you add it to your path in ~/.profile and that you restart terminal (so that the changes take effect). G77 will go in /usr/local/bin, so you should add a line to your ~/.profile like:export PATH=/usr/local/bin:$PATH2) You need fftw. I just downloaded, did a ./configure , make, sudo make install and it went off without a hitch.

3) Now you want to install it++. First, go download and unpack it. Then, you should be able to:./configure

You'll see this (hopefully)------------------------------------------------------------------------------itpp-3.10.10 library configuration:------------------------------------------------------------------------------

6 comments:

Also, Brad and Andrew helped me get it working with xcode, I just added /usr/local/include to the Header Search Paths, /usr/local/lib to the Library Search Paths and disabled the ZeroLink option. So now I can compile and run their matrix inversion example