【发布时间】:2014-09-26 03:11:54
【问题描述】:
我在 matlab 中调用 c 函数时遇到了很多麻烦。
我的c函数很简单
test.c
#include "mex.h"
int addOne(int a)
{
return a+1;
}
我在 matlab 命令窗口中输入了 mex test.c,我得到了这个错误信息
Undefined symbols for architecture x86_64:
"_mexFunction", referenced from:
-exported_symbol[s_list] command line option
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
mex: link of ' "test.mexmaci64"' failed.
我的 Matlab 是 2013a,osx 10.9,xcode 5.02
有人对此有任何想法吗?谢谢。
【问题讨论】: