The command line for building test.cc looks like this for me:

g++ test.cc -o test -I/usr/matlab/7R14/extern/include -L/usr/matlab/7R14/bin/glnx86 -lmat -lmx -lut -licudata -licui18n -licuuc -lustdio
