필터 지우기
필터 지우기

c-file to mex-file pnet.c in OS 10.9.5 MATLAB 2012a

조회 수: 8 (최근 30일)
florian schertenleib
florian schertenleib 2016년 1월 6일
댓글: Walter Roberson 2020년 8월 6일
System:
OS 10.9.5
MATLAB R2012a
terminal request: gcc --version
Configured with: --prefix=/Library/Developer/CommandLineTools/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 6.0 (clang-600.0.57) (based on LLVM 3.5svn)
Target: x86_64-apple-darwin13.4.0
Thread model: posix
llvm-gcc --version Apple LLVM version 6.0 (clang-600.0.57) (based on LLVM 3.5svn)
Target: x86_64-apple-darwin13.4.0;
I would like to convert the pnet.c file into a mex-file, see below:
>> mex pnet.c
/Applications/MATLAB_R2012a.app/bin/mex: line 305: gcc-4.2: command not found
mex: pnet.c not a normal file or does not exist.
I'm a beginner and I tried for too long already to find some answer by myself... can anyone help me please?
thanks in advance!

답변 (1개)

Walter Roberson
Walter Roberson 2016년 1월 7일
The message is fairly clear: you need to install gcc 4.2 to use that configuration. If it already is installed then you need to create a symbolic link from "gcc-4.2" to the actual software.
  댓글 수: 4
芝 赵
芝 赵 2020년 7월 29일
How to solve this probelm when I use mex pnet.c
Tip: the first four red words are 'Error use mex'
blem
Walter Roberson
Walter Roberson 2020년 8월 6일
It looks to me as if you should possibly use
mex pnet.c -lws2_32

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

카테고리

Help CenterFile Exchange에서 Write C Functions Callable from MATLAB (MEX Files)에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by