For some reasons I have to compile my MEX files under the Visual studio environment. There are many tutorials and my MEX files are working fine. However, there are a few MEX options, say -largeArrayDims
in mex
options, which I do not know where to turn on under the VS environment. Can anyone offer help?
相关问题
- Extract matrix elements using a vector of column i
- How to know full paths to DLL's from .csproj f
- Importing NuGet references through a local project
- Visual Studio 2019 - error MSB8020: The build tool
- 'System.Threading.ThreadAbortException' in
相关文章
- How to show location of errors, references to memb
- How to track MongoDB requests from a console appli
- Visual Studio Hangs on Loading UI Library
- How to use Mercurial from Visual Studio 2010?
- How do I append metadata to an image in Matlab?
- Copy different file to output directory for releas
- Edit & Continue doesn't work
- “Csc.exe” exited with code -1073741819
The
-largeArrayDims
option is a switch to themex
command in MATLAB that simply indicates not to defineMX_COMPAT_32
. So, in Visual Studio, you don't have to do anything since this is not defined by default. If you want the opposite behavior (-compatibleArrayDims
), then defineMX_COMPAT_32
in the Preprocessor section. From tmwtypes.h:tmwtypes.h
In general, it is convenient to use a property sheet to set all the necessary settings for building a MEX file (library dependencies, headers, MEX-file extension, etc.). A single property sheet that works automatically for either 32-bit or 64-bit MATLAB can be found at GitHub.
Add the property sheet to each build configuration for the MEX project in the Property Manager (right click on the configuration such as
Debug | x64
and select "Add Existing Property Sheet". See this post for detailed instructions.A few additional notes:
/EXPORT:mexFunction
instead of a .def file. With a single exported function, this is much simpler.