필터 지우기
필터 지우기

Error using sfcnbuilde​r.createCo​mpileCSfun Error while obtaining sizes from MEX S-function

조회 수: 21 (최근 30일)
Hello together,
I do have troubles compiling a C-Code into a S-function using the S-Function builder block in simulink. I did compile the same code (excluding different library paths obvisouly) with MinGW64 on another Computer using Matlab R2021b and the mex-File works perfectly within the simulink model.
However on the other Laptop with Matlab R2022a the C-Code also is compiled and a mex-File is generated. But immediately after that I receive an error saying:
Error using sfcnbuilder.createCompileCSfun Error while obtaining sizes from MEX S-function 's_fun_name' in 'model_v2/Subsystem/Subsystem1/Subsystem2/C//C++ Code Block'. - Show complete stack trace Caused by: Error using sfcnbuilder.createCompileCSfun Invalid MEX-file 'workingfolder\s_fun_name.mexw64': Das angegebene Modul wurde nicht gefunden. - Show complete stack track
and the all three Code-Files (.c, .c_wrapper & .mexw64) are deleted from the working folder. If you click on show complete stack track nothing happens.
Anybody had similar troubles?
Kind regards

답변 (1개)

Kausthub
Kausthub 2023년 12월 28일
Hi Eyzie,
I understand that you are facing an error while using the S-Function builder to build your S-Function. From the error message, “Error while obtaining sizes from MEX S-Function” is caused due to the “specified module could not be found” error.
I believe that there are two possible reasons for “specified module could not be found” error:
  • Some of the required DLL files are missing i.e., you do not have all the necessary libraries that the MEX-function is dependent upon.
  • You are running a MEX-file on a different version of MATLAB than it was compiled on.
You could refer to these articles which explains how to solve the error in detail:
Hope it helps!

카테고리

Help CenterFile Exchange에서 Simulink Functions에 대해 자세히 알아보기

제품


릴리스

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by