Как предоставить Matlab старую версию gcc, которую он хочет?

На моем компьютере установлена ​​Ubuntu 10.10 с gcc 4.4.4. Я пытаюсь скомпилировать некоторые mex-файлы, использующие CUDA, и получаю следующее сообщение об ошибке:

>> cns_build('hmax')
compiling...
/home/leMe/hmax/cns/source/common_dec.h(54): warning: omission of exception specification is incompatible with previous function "operator new(size_t)"
/usr/include/c++/4.4/new(91): here
/home/leMe/hmax/cns/source/common_dec.h(55): warning: omission of exception specification is incompatible with previous function "operator new[](size_t)"
/usr/include/c++/4.4/new(92): here
/home/leMe/hmax/cns/source/common_dec.h(56): warning: omission of exception specification is incompatible with previous function "operator delete(void *)"
/usr/include/c++/4.4/new(93): here
/home/leMe/hmax/cns/source/common_dec.h(57): warning: omission of exception specification is incompatible with previous function "operator delete[](void *)"
/usr/include/c++/4.4/new(94): here

Segmentation fault
CUDA preprocessing [nvcc] failed
Warning: You are using gcc version "4.4.4-14ubuntu5)".  The version
         currently supported with MEX is "4.2.3".
         For a list of currently supported compilers see: 
         http://www.mathworks.com/support/compilers/current_release/
CPU compilation successful

Я полагаю, связав Matlab с gcc 4.2.3, я могу избавиться от ошибки, но я не знаю, как это сделать.

mex -setup дает мне следующие варианты:

1: /home/leMe/Matlab/bin/gccopts.sh : 
      Template Options file for building gcc MEX-files

  2: /home/leMe/Matlab/bin/mexopts.sh : 
      Template Options file for building MEX-files via the system ANSI compiler
8
задан Framester 15 December 2011 в 17:33
поделиться