Borrar filtros
Borrar filtros

How can I include a version resource file in a MEX function on Windows?

1 visualización (últimos 30 días)
I am using MATLAB on Windows and am creating a MEX-file. Since a MEX-file is a shared library, I would like to be able to include version information in the MEX-file in the same way that I do with other DLLs, that is using a resource file.

Respuesta aceptada

MathWorks Support Team
MathWorks Support Team el 2 de Nov. de 2020
Editada: MathWorks Support Team el 2 de Nov. de 2020
It is possible to add a version resource to a MEX-file. Below are the general steps.
1) Create a compiled version resource file (.res). This can be done using Microsoft Visual Studio's resource compiler (RC) which will compile a resource script (.rc). One easy way to do this is to create a version resource file in a dummy win32 shared library project.
If you need help creating a compiled version resource please refer to the Microsoft Visual Studio documentation at
2) Compile the MEX file and include the resource file created in step 1. For example, if you have a compiled resource file version.res the following command will link it to the MEX-file.
mex yprime.c version.res
Note that you need to use the compiled resource file in order to link it to a MEX-file.

Más respuestas (0)

Categorías

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

Etiquetas

Aún no se han introducido etiquetas.

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by