File Exchange

image thumbnail

Matlab mex support for Visual Studio 2013 (and mbuild)

version 1.0.0.0 (8.9 KB) by Petter
Adds mex support for Microsoft’s latest compiler.

19 Downloads

Updated 21 Nov 2013

View License

Read the attached readme file and copy the script files to the correct location.

Then run

mex -setup

and Visual Studio 2013 will be listed among the choices.

Comments and Ratings (56)

Gina Gina

matlab2016a没有mbulidopts文件夹怎么办

long ren

not fit for r2015b

zhy

super_geek

yonger001

it's cool,3Q

Anything similar for win32?

xin zhao

White Wolf

Ali Li

it's useful. thank you very much!

Zhi Xu

very goood

yang yiwu

It works on R2012a,thanks very much!

fourmi john

十分给力,很感谢

yang chen

it works on R2012a,thanks

sucre

could you send script files to me.Thank you!

I need to compile mex file with Matlab 2016b and Visual Studio 2013 Community (as my school doesn't have license for professional version of VS). After following the instruction above I got msg like :
mex -setup
MEX configured to use 'Microsoft Visual C++ 2013 Professional (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

Isn't it work with community version....please help me.

Xiyuan Yu

It works! Thanks!

cattylover

Will it work on 2010a?Im like a cat on hot bricks

g8 m8 I r8 8/8

In matlab r 2015b there is no mbuildopts folder.What to do then?

how to realize it?click the watching this file?

Jay

very good thanks

Dang Le Van

That works for Matlab 2015b too. Thanks for that!

Haoyue Zeng

it works on 2014a

jif

Can this files work on matlab2015a?

Anish D

this didn work on matlab 2014..how to solve the issue in matlab 2014 sir

Sorry but I wonder know why I receive these message...
'E:\Program' 不是内部或外部命令,也不是可运行的程序或批处理文件。
E:\PROGRAM FILES XX\THE MATHWORKS\MATLAB\R2013A\BIN\MEX.PL: Error: mwregsvr for C:\Users\dell5537\OneDrive\Documents\MATLAB\DEMO\src\DEMO_1_0.dll failed.
Error: An error occurred while shelling out to mbuild (error code = 2).
Unable to build executable.

luo man

why it does not work on 32_bit???so said .

Favio

Thank you!

henry han

Perfect!

wa wa

As a Chinese,I must say:多谢多谢!!!

Morag Agmon

Works great with Matlab R2013b Win x64.
Thanks!

leonardo

Perfect!!!

Avaa Gao

Thx!

Raimund

Great solution! Thx!

I don't usually comment, but this contribution was extremely helpful for me (2013b). It deserves 10 stars. Thanks man!

Jiong

Awesome! It works on Matlab 2012b. Finally can use my favourite visual studio compiler instead of the windows sdk.

James

Worked perfect for me on 2013a. Thanks.

Fascinating! Thanks!

Michael

Michael

Jason

Anders

wei

Atae

Petter

Jingyi: I recommend that you start using a 64-bit version.

Petter

Avnish: I have no idea.

Jingyi

only has x64 version >_<

Avnish

Will it work on 2010a?

Douglas

Thanks for this - works on 2012a :)

TGI

Thanks for it really works on MATLAB 2013B.

MATLAB Release Compatibility
Created with R2013a
Compatible with any release
Platform Compatibility
Windows macOS Linux
Tags Add Tags
1 mex