如何在matlab 2016a中找到mex的编译器?

时间:2017-03-02 11:27:42

标签: matlab mex

使用Matlab 2013b,我运行了命令class ViewController: UIViewController, UITableViewDataSource, UITableViewDelegate { let data = ["111111", "2222222","3333333"] public func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { return(data.count) } public func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { let cell = tableView.dequeueReusableCell(withIdentifier: "cell", for: indexPath) as! TableViewCell cell.lb1.text = data[indexPath.row] cell.stepper.tag = indexPath.row cell.stepper.addTarget(self, action: #selector(stepperA(sender:)), for: .valueChanged) return (cell) } func stepperA (sender: UIStepper){ print("stepper \(sender.tag) clicked. Its value \(sender.value)") } override func viewDidLoad() { super.viewDidLoad() // Do any additional setup after loading the view, typically from a nib. } override func didReceiveMemoryWarning() { super.didReceiveMemoryWarning() // Dispose of any resources that can be recreated. } } ,我得到了结果:

mex -setup

我的问题是,在Matlab2016a下我看不到这条消息 - 我只得到以下结果:

>> mex -setup

Welcome to mex -setup.  This utility will help you set up  
a default compiler.  For a list of supported compilers, see  
http://www.mathworks.com/support/compilers/R2013b/win64.html 

Please choose your compiler for building MEX-files: 

Would you like mex to locate installed compilers [y]/n? n

请,我如何看到消息

>> mex -setup MEX configured to use 'Microsoft Visual C++ 2012 (C)' for C language compilation. Warning: The MATLAB C and Fortran API has changed to support MATLAB variables with more than 2^32-1 elements. In the near future you will be required to update your code to utilize the new API. You can find more information about this at: http://www.mathworks.com/help/matlab/matlab_external/upgrading-mex-files-to-use-64-bit-api.html. To choose a different language, select one from the following: mex -setup C++ mex -setup FORTRAN

非常感谢。

1 个答案:

答案 0 :(得分:1)

来自MATLAB documentation

  

要更改默认C ++编译器,请键入:

mex -setup cpp

通过这种方式,您可以更改为不同的编译器(如果有的话)。调用mex -setup设置C编译器,可能不同。