필터 지우기
필터 지우기

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

조회 수: 1 (최근 30일)
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.

채택된 답변

MathWorks Support Team
MathWorks Support Team 2020년 11월 2일
편집: MathWorks Support Team 2020년 11월 2일
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.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Write C Functions Callable from MATLAB (MEX Files)에 대해 자세히 알아보기

태그

아직 태그를 입력하지 않았습니다.

제품

Community Treasure Hunt

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

Start Hunting!

Translated by