I'm trying to compile the mex functions from the MVTB. I've made sure to install gcc 4.9 for compatibility, but still I get the following error when using either make from my system's terminal or from inside matlab:
mex CFLAGS=-std=c99 -g closest.c
Building with 'gcc'.
/usr/bin/ld: /tmp/mex_2525300140537866_21902/closest.o: relocation R_X86_64_32 against `.rodata' can not be used when making a shared object; recompile with -fPIC
/tmp/mex_2525300140537866_21902/closest.o: error adding symbols: Bad value
collect2: error: ld returned 1 exit status
Makefile:25: recipe for target 'mex' failed
make: *** [mex] Error 255