Linux操作系统下Matlab的安装设置

豆豆网   技术应用频道   2007年12月25日    社区交流

关键字: MATLAB入门 MATLAB

本文详细介绍Linux操作系统下Matlab的安装设置

  5. Support for maple interface(摘抄,没试过)

  [最新的matlab7.3版本似乎已经解决了符号运算功能]

  export LD_ASSUME_KERNEL=2.4.1

  (...)

  6、Support for compiling a mex file(摘抄,没试过)

  [最新版本的matlab7.3即2006b已经可以使用gcc4.1.0编译mex文件,虽然官方支持的版本为3.4.0-3.4.5]

  [在编译mex文件前,执行mex -setup设置编译环境]

  I'm trying to compile a Mex file on SuSE linux 10.1, which uses GCC 4.1.0.
The file compiles fine, but when I try to run it I get this error:
/opt/Matlab/bin/glnx86/../../sys/os/glnx86/libgcc_s.so.1: version
`GCC_3.3' not found (required by /usr/lib/libstdc++.so.6).
From the documentation, it appears as though Matlab only supports GCC 3.2.3.
I suspect that my only solution is to download and compile this compiler and
then use it to compile my mex file.If you must use gcc 3.2.3, your best bet is
to first build and install gcc 3.3.6, and then use that to build gcc 3.2.3.

  3.1. build and install gcc 3.3.6 first

download gcc-3.3.6.tar.bz2 to /home/max/
cd home/max
tar xjvf gcc-3.3.6.tar.bz2 # $srcdir=/home/max/gcc-3.3.6
mkdir objdir
cd objdir
$srcdir/configure --prefix=/opt/gcc-3.3.6 # or wherever
make bootstrap
  su
make install

  3.2 and then use gcc 3.3.6 to build gcc 3.2.3

export PATH=/opt/gcc-3.3.6/bin:$PATH
export LD_LIBRARY_PATH=/opt/gcc-3.3.6/lib:$LD_LIBRARY_PATH
mkdir objdir
cd objdir
$srcdir/configure --prefix=/opt/gcc-3.2.3 # or wherever
make bootstrap
  su
make install

  3.3 now, compile your mex file, before compiling do

export PATH=/opt/gcc-3.2.3/bin:$PATH

来源:豆豆网转载    责编:豆豆技术应用

正在加载评论...