How to build mex file directly in Visual Studio 2010?
来源:互联网 发布:淘宝刷流量收藏软件 编辑:程序博客网 时间:2024/04/27 12:56
After some experimenting with guidance from this page mentioned in the question, it seems like starting with an empty C++ project the following settings in the project's Property Pages are necessary and sufficient to build a working .mexw64 from Visual Studio 2010:
Configuration properties -> General: Set Target Extension to .mexw64 Set Configuration Type to Dynamic Library (.dll)Configureation poperties -> VC++ Directories: Add $(MATLAB_ROOT)\extern\include; to Include DirectoriesConfiguration properties -> Linker -> General: Add $(MATLAB_ROOT)\extern\lib\win64\microsoft; to Additional Library DirectoriesConfiguration properties -> Linker -> Input: Add libmx.lib;libmex.lib;libmat.lib; to Additional DependenciesConfiguration properties -> Linker -> Command Line: Add /export:mexFunction to Additional Options
$(MATLAB_ROOT)
is the path to Matlab's root folder, eg. C:\Program Files\MATLAB\R2013a.
So far this has only been tried from a solution created from scratch and built for Matlab 2013a 64-bit. I assume that to build for 32-bit one only needs to change both occurrences of 64 to 32. I will update the post when I have confirmed that this works for an existing solution.
EDIT: As expected this works for projects added to existing solutions. Remember to set the new project to be dependent on the project that creates the library.
- How to build mex file directly in Visual Studio 2010?
- How to build an OLE DB application for SQL Server CE in Visual Studio 2005
- How to Build ARPACK in Windows10 with Microsoft Visual Studio 2015
- How to use Boost in Visual Studio 2010
- How To Set Dark Theme in Visual Studio 2010
- How to compile PortAudio in Visual Studio
- How to update ASP.NET Page's .designer.cs file in visual studio
- How to build a binary XPCOM component using Visual Studio
- How to Build libiconv with Microsoft Visual Studio
- How to Build libiconv with Microsoft Visual Studio
- Compiling a MEX file with Visual Studio
- How can I do a parallel build in Visual Studio 2010?
- How to Resolve the 'Error MSB6006 tsc.exe exited with code 2' build error in Visual Studio 2015
- microsoft visual studio 2010 build 时提示:“failure during conversion to COFF: file invalid or corrupt ”
- How to create a File-Compare function in Visual C#
- how to modify Visual Studio 2010 environment
- How to debug a Visual Studio .NET 2005 Add-In
- How to disable Intellisense in Visual Studio 2008?
- android GridView,Gallery,ListView
- [代码阅读]gem5中的classic cache 初步(1)
- 如何在HTML网页中设置弹出窗口的办法
- arcpy.mapping 类列表
- Monkeyrunner 录制脚本&回放
- How to build mex file directly in Visual Studio 2010?
- HTML5中canvas实现小球击打小方块游戏
- div分层
- poj2342 简单树形DP
- java中synchronized用法
- 解决easyui datagrid 翻页全选的问题
- 潇雨菲回头这才注意到环
- wireshark 过滤条件
- C++中引用(&)的用法和应用实例