Matlab R2013a: C++ MEX on Ubuntu 14.04 64-bit
2015-02-01 19:16
549 查看
原文地址:
http://blogs.bu.edu/mhirsch/2013/07/matlab-r2013a-mex-on-ubuntu-13-04-64-bit/
(2) in Matlab, type
(3)
(allows you to edit this file)
(3)
and change:
Also to save yourself grief when you’re using a modern C++ syntax file (especially if you get errors like
error: expected expression before ‘/’ token
)
then make this additional changes:
(4) Save/exit gedit and restart Matlab. You should now be able to use MEX in Matlab R2013a under Ubuntu 14.04.
[/code]
http://blogs.bu.edu/mhirsch/2013/07/matlab-r2013a-mex-on-ubuntu-13-04-64-bit/
Note: the way Mex setup works has changed in R2014a and newer. This is for older version of Matlab R2013 and older Ubuntu 14.04 comes with GCC 4.8, but Matlab R2013a gives warnings about needing GCC 4.4 if using MEX features. (1) Packages to install (synaptic or apt-get) [code] gcc-4.4 g++-4.4
(2) in Matlab, type
mex -setupand press 1 to copy the mexopts.sh to your ~/.matlab/R2013a/mexopts.sh
(3)
sudo chmod 644 ~/.matlab/R2013a/mexopts.sh
(allows you to edit this file)
(3)
gedit mexopts.sh
and change:
CC='gcc-4.4' CXX='g++-4.4'
Also to save yourself grief when you’re using a modern C++ syntax file (especially if you get errors like
error: expected expression before ‘/’ token
)
then make this additional changes:
#CFLAGS='-ansi -D_GNU_SOURCE' CFLAGS='-std=c99 -D_GNU_SOURCE'
(4) Save/exit gedit and restart Matlab. You should now be able to use MEX in Matlab R2013a under Ubuntu 14.04.
[/code]
相关文章推荐
- Matlab R2013a: C++ MEX on Ubuntu 14.04 64-bit
- docker-engine 1.13.0~trusty can't install on clean Ubuntu 64-bit 14.04 LTS
- Installing teamviewer 9 on 64-bit Ubuntu 13.10
- Installing Ubuntu 14.04 on a Pre-Installed Windows 8 (64-bit) System (UEFI Supported)
- 在Ubuntu Trusty 14.04 (LTS) (64-bit)安装Docker
- Ubuntu 14.04 64 bit error while loading shared libraries: libgtk-x11-2.0.so.0
- linux 下 VNC Server安装配置及 eclipse CDT C/C++ 开发环境搭建(我用的是阿里云服务器 ubuntu 12.04 64-bit,无图形化界面)
- 【指导]如何编译完整建立开发环境和编译Android 4.0.1 on Ubuntu 11.04 (64 bit)
- NVIDIA Cuda 7.5 on Ubuntu 14.04 64 bits
- Ubuntu 14.04 64 bit+ Torch 7 + CUDA7安装配置
- 【指导]如何编译完整建立开发环境和编译Android 4.0.1 on Ubuntu 11.04 (64 bit)
- 在Ubuntu Trusty 14.04 (LTS) (64-bit)安装Docker
- ubuntu 14.04 64 bit上开启nscd服务缓存加速及清除dns缓存
- 在Ubuntu Trusty 14.04 (LTS) (64-bit)安装Docker的步骤
- How to run 32-bit app in Ubuntu 14.04 64-bit?
- HOWTO: 32-Bit Chroot on 64-Bit Installs (ubuntu)
- 在Ubuntu Trusty 14.04 (LTS) (64-bit)安装Docker的步骤
- [Tools]build crash ARM64 on ubuntu-1204-64-bit for crashdump analyze
- Installing Ubuntu on a Pre-Installed Windows 8 (64-bit) System (UEFI Supported)
- Ubuntu 14.04 64 bit+ Torch 7 + CUDA7安装配置