Effacer les filtres
Effacer les filtres

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

1 vue (au cours des 30 derniers jours)
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.

Réponse acceptée

MathWorks Support Team
MathWorks Support Team le 2 Nov 2020
Modifié(e) : MathWorks Support Team le 2 Nov 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.

Plus de réponses (0)

Catégories

En savoir plus sur Write C Functions Callable from MATLAB (MEX Files) dans Help Center et File Exchange

Tags

Aucun tag saisi pour le moment.

Produits

Community Treasure Hunt

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

Start Hunting!

Translated by