Generating a mex file from .m file

조회 수: 1 (최근 30일)
Aleksandar Nikolic
Aleksandar Nikolic 2015년 6월 10일
답변: Ken Atwell 2015년 6월 11일
Hi all,
I am trying to generate a mex file from a .m file by using "matlab coder", though I've got a problem with missing a library. The program I have is a simple helloWorld program, i.e. there's no problem with the code, but with the linking. In addition, I am not allowed to install anything on this PC.
Here's the error I'm getting during the linking:
.../gcc/x86_64-unknown-linux-gnu/4.1.2/../../../../x86_64-unknown-linux-gnu/bin/ld: cannot find -lstdc++ collect2: ld returned 1 exit status gmake: * [helloWorld_mex.mexa64] Error 1
Could anyone help me? Thanks in advance.
  댓글 수: 1
Walter Roberson
Walter Roberson 2015년 6월 10일
Is there also a message something like
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.4.1/libstdc++.so when searching for -lstdc++

댓글을 달려면 로그인하십시오.

답변 (1개)

Ken Atwell
Ken Atwell 2015년 6월 11일
It looks like your system does not have the GNU C++ standard library installed. I believe this can be the case in some down distros. I'm afraid you're going to need your admin to install "gcc-g++" or some similarly-named package.
See also the footnotes of the support compilers page for Linux.

카테고리

Help CenterFile Exchange에서 Troubleshooting in MATLAB Compiler SDK에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by