MATLAB Answers

MATLAB 2016b Error using mex 'USE_DEFAU​LT_OPERATI​NG_POINT' undeclared

1 view (last 30 days)
I´m using MATLAB 2016b and want to use a S-Function. But when using
mex myReglerSFcn.c
this happens
>> mex myReglerSFcn.c
Building with 'MinGW64 Compiler (C)'.
Error using mex
D:\...\myReglerSFcn.c: In function 'mdlInitializeSizes':
D:\...\myReglerSFcn.c:100:38: error: 'USE_DEFAULT_OPERATING_POINT' undeclared (first use in
this function)
ssSetOperatingPointCompliance(S, USE_DEFAULT_OPERATING_POINT);
D:\...\myReglerSFcn.c:100:38: note: each undeclared identifier is reported only once for each
function it appears in
I used
#include "simstruc.h"
the MinGW Compiler is installed an when used with MATLAB 2019a it all works well.


Sign in to comment.

Accepted Answer

Annette Schmidt
Annette Schmidt on 16 Sep 2020
Solved the problem myself:
My original function was based on the example
which I got from the 2019a version. This example differs to the one from the 2016b version. So I took my function code and put it into the old versions example. This old example differs in various code lines among others the one in the error message.


Sign in to comment.

More Answers (0)

Community Treasure Hunt

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

Start Hunting!

Translated by