linux系统如何查看分配给matlab的内存,matlab - 在64位Linux上进行Mex编译-/ usr / bin / ld:找不到-lstdc ++ - 堆栈内存溢出...

好吧,我正在尝试在64位linux上编译一个mex文件,确切地说是在Matlab 2013a上编译为ubuntu。

首先,它给出了一个找不到GLIBCXX_3.4.15的错误。 这不是/usr/local/MATLAB/R2013a/sys/os/glnxa64/libstdc++.so.6一部分。 我发现此线程/usr/lib/libstdc++.so.6:未找到版本“ GLIBCXX_3.4.15”,并成功创建了符号链接ln -s /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.17 libstdc++.so.6 /usr/local/MATLAB/R2013a/sys/os/glnxa64 ln -s /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.17 libstdc++.so.6 /usr/local/MATLAB/R2013a/sys/os/glnxa64

现在我尝试再次编译,现在我得到/usr/bin/ld: cannot find -lstdc++ collect2: error: ld returned 1 exit status

这是输出

>> mex -v tload3.c

**************************************************************************

Warning: Neither -compatibleArrayDims nor -largeArrayDims is selected.

Using -compatibleArrayDims. In the future, MATLAB will require

the use of -largeArrayDims and remove the -compatibleArrayDims

option. For more information, see:

http://www.mathworks.com/help/matlab/matlab_external/upgrading-mex-files-to-use-64-bit-api.html

**************************************************************************

-> mexopts.sh sourced from directory (DIR = $PREF_DIR)

FILE = /home/wouter/.matlab/R2013a/mexopts.sh

----------------------------------------------------------------

-> MATLAB = /usr/local/MATLAB/R2013a

-> CC = gcc

-> CC flags:

CFLAGS = -ansi -D_GNU_SOURCE -fexceptions -fPIC -fno-omit-frame-pointer -pthread

CDEBUGFLAGS = -g

COPTIMFLAGS = -O -DNDEBUG

CLIBS = -Wl,-rpath-link,/usr/local/MATLAB/R2013a/bin/glnxa64 -L/usr/local/MATLAB/R2013a/bin/glnxa64 -lmx -lmex -lmat -lm -lstdc++

arguments = -DMX_COMPAT_32

-> CXX = g++

-> CXX flags:

CXXFLAGS = -ansi -D_GNU_SOURCE -fPIC -fno-omit-frame-pointer -pthread

CXXDEBUGFLAGS = -g

CXXOPTIMFLAGS = -O -DNDEBUG

CXXLIBS = -Wl,-rpath-link,/usr/local/MATLAB/R2013a/bin/glnxa64 -L/usr/local/MATLAB/R2013a/bin/glnxa64 -lmx -lmex -lmat -lm

arguments = -DMX_COMPAT_32

-> FC = gfortran

-> FC flags:

FFLAGS = -fexceptions -fbackslash -fPIC -fno-omit-frame-pointer

FDEBUGFLAGS = -g

FOPTIMFLAGS = -O

FLIBS = -Wl,-rpath-link,/usr/local/MATLAB/R2013a/bin/glnxa64 -L/usr/local/MATLAB/R2013a/bin/glnxa64 -lmx -lmex -lmat -lm

arguments = -DMX_COMPAT_32

-> LD = gcc

-> Link flags:

LDFLAGS = -pthread -shared -Wl,--version-script,/usr/local/MATLAB/R2013a/extern/lib/glnxa64/mexFunction.map -Wl,--no-undefined

LDDEBUGFLAGS = -g

LDOPTIMFLAGS = -O

LDEXTENSION = .mexa64

arguments =

-> LDCXX =

-> Link flags:

LDCXXFLAGS =

LDCXXDEBUGFLAGS =

LDCXXOPTIMFLAGS =

LDCXXEXTENSION =

arguments =

----------------------------------------------------------------

Warning: You are using gcc version "4.7.3". The version

currently supported with MEX is "4.4.x".

For a list of currently supported compilers see:

http://www.mathworks.com/support/compilers/current_release/

-> gcc -c -I/usr/local/MATLAB/R2013a/extern/include -I/usr/local/MATLAB/R2013a/simulink/include -DMATLAB_MEX_FILE -ansi -D_GNU_SOURCE -fexceptions -fPIC -fno-omit-frame-pointer -pthread -DMX_COMPAT_32 -O -DNDEBUG "tload3.c"

-> gcc -O -pthread -shared -Wl,--version-script,/usr/local/MATLAB/R2013a/extern/lib/glnxa64/mexFunction.map -Wl,--no-undefined -o "tload3.mexa64" tload3.o -Wl,-rpath-link,/usr/local/MATLAB/R2013a/bin/glnxa64 -L/usr/local/MATLAB/R2013a/bin/glnxa64 -lmx -lmex -lmat -lm -lstdc++

/usr/bin/ld: cannot find -lstdc++

collect2: error: ld returned 1 exit status

mex: link of ' "tload3.mexa64"' failed.

Error using mex (line 206)

Unable to complete successfully.

ps还有一个标题大致相同的线程, 在Kubuntu'/ usr / bin / ld:构建MEX文件(MATLAB 2012a)时出错:找不到-lstdc ++' ,不幸的是,安装sudo apt-get install libstdc++6-4.4-dev对我不起作用。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值