When I then try to link my hand-written code with Real-Time Workshop generated code that contains 'rt_nonfinite.c' , I get the following error at compile time:
./fadec_autocode/fadec_src/lib/libfadec.a(rt_nonfinite.o): In function `rtIsNaN': /sim/sandbox/AE1107/C/src/fadec_autocode/fadec_src/rt_nonfinite.c:170: undefined reference to `_isnan' ./fadec_autocode/fadec_src/lib/libfadec.a(rt_nonfinite.o): In function `rtIsNaNF': /sim/sandbox/AE1107/C/src/fadec_autocode/fadec_src/rt_nonfinite.c:180: undefined reference to `_isnan'
Previous uses of real-time workshop on a different version of the same simulink model
yielded different results for the rtIsNaN and rtIsNaNF functions.
Previously, the real-time workshop output rtIsNan and rtIsNaNF as shown
below and did not actually use _isnan:
/* Function: rtIsNaN ================================================== * Abstract: *Test if value is not a number */boolean_T rtIsNaN(real_T value){ return((value!=value) ? 1U : 0U);}
As opposed to what I'm getting now that is causing the issue:
/* Function: rtIsNaN ================================================== * Abstract: *Test if value is not a number */boolean_T rtIsNaN(real_T value){ return _isnan(value)? TRUE:FALSE;}
Why is the implementation different now? What do I do to resolve this situation?
Best Answer