How to compile mex files using gcc and makefiles

12 visualizaciones (últimos 30 días)
Bene Wilde
Bene Wilde el 2 de Mayo de 2016
Respondida: Dave Behera el 3 de Mayo de 2016
I want to compile C++ code to mex files with gcc using makefiles. Which options do I have to pass to the compiler for the compiled file to work with Matlab?
How do I choose between "-largeArrayDims" and "-compatibleArrayDims"?
  1 comentario
Walter Roberson
Walter Roberson el 2 de Mayo de 2016
The only reason to use compatibleArrayDims now is if you are stuck using a pretty old release or you are stuck having to interface a 32 bit program that you cannot update.

Iniciar sesión para comentar.

Respuestas (1)

Dave Behera
Dave Behera el 3 de Mayo de 2016
According to the documentation at
-compatibleArrayDims — Uses the MATLAB Version 7.2 array-handling API, which limits arrays to 2^31-1 elements. Default option. -largeArrayDims — Uses the MATLAB large-array-handling API. This API handles arrays with more than 2^31-1 elements. Must use this option when calling LAPACK or BLAS functions.

Categorías

Más información sobre Write C Functions Callable from MATLAB (MEX Files) en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by