I'm using Ubuntu 18.04.4 LTS, and I'm trying to compile a MATLAB-based program (SPM12), following their online instructions, and I believe I'm running into a problem of having a GCC version that is 'too new'.
When I reach a step in the process where my command is make && make install
, I'm getting the following error message:
Warning: You are using gcc version '7.5.0'. The version of gcc is not supported. The version currently supported with MEX is '6.3.x'. For a list of currently supported compilers see: https://www.mathworks.com/support/compilers/current_release.
/usr/bin/ld: cannot find -lstdc++
collect2: error: ld returned 1 exit status
Makefile:247: recipe for target 'spm_sample_vol.mexa64' failed
make: *** [spm_sample_vol.mexa64] Error 255
Any advice would be greatly appreciated! I'm no expert, so if you could offer specific commands to follow I'd really appreciate that. Ben