尝试在MatLab中编译C mex文件 [英] Trying to Compile a C mex file in MatLab

查看:382
本文介绍了尝试在MatLab中编译C mex文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嘿,我试图在MatLab中编译一个C文件,但是我遇到了这个错误,并且我试图弄明白这一点.任何指导都将不胜感激.

Hey trying to compile one C-file in MatLab, but I got this error and I'm trying to make sense of it. Any and all guidance is greatly appreciated.

>> mex BDS_unpack_mex5.c
xcrun: error: SDK "macosx10.7" cannot be located
clang: warning: no such sysroot directory: '-mmacosx-version-min=10.7'
BDS_unpack_mex5.c:17:10: fatal error: 'math.h' file not found
#include <math.h>
     ^
1 error generated.

mex: compile of ' "BDS_unpack_mex5.c"' failed.

Error using mex (line 206)
Unable to complete successfully.

推荐答案

该问题存在于MatLab认为存在的问题(MatLab认为我已经给出了新的OSX版本)(小牛),因此我选择安装此更新.我最终找到了包含mex选项的文件,更改了OSX值以读取OSX的当前版本,下载了当前版本的Xcode,并确保一切正常,并且可以运行

The problem existed within the version of OSX that MatLab thought I had given that the new OSX version came out (Mavericks) and I chose to install the update. I ended up finding the file that had mex options in it, changed the OSX values to read the current version of OSX, I downloaded the current version of Xcode and voila everything functioned and I could run my

mex BDS_unpack_mex5.c

允许我编译mex文件,使用其中的函数并拥有美好的一天= D

Which allowed me to compile the mex file, use the function within and have a beautiful day =D

这篇关于尝试在MatLab中编译C mex文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆