Image Reconstruction in Diffuse Optical Tomography

Topics:

Questions:

Compilation problems - Linux

Q1: When I run "make matlab" or "make matlab2" to compile the Matlab mex bindings, I get an error "mex: Command not found".

A1:You need the mex compiler installed on your system to compile the Toast Matlab bindings". Type "which matlab" to see where your Matlab executables are located. The same directory should also contain the "mex" executable. If it doesn't, then the mex compiler isn't installed, and you won't be able to compile the Matlab bindings.


Q2: When I run "make matlab" or "make matlab2" to compile the Matlab mex bindings, it runs without error, but no mex file is generated.

A2:This may indicate that the Makefile finds the wrong "mex" executable on the search path. It appears that some TeX typesetting installations contain a "mex" executable that is picked up before the Matlab mex compiler.

Type "which mex" on the command line. The Matlab mex compiler should be located on the same path as the "matlab" executable. If the system finds the wrong mex executable, you have to edit the path manually in Makefile.incl:

Find the line "MEXBIN = mex", and replace "mex" with the full path, e.g.

MEXBIN = /usr/local/Matlab/matlab-R2013a/bin/mex

This assumes that the mex compiler is actually installed on your system. (See Q1).