GRT Code from R2007b for 3-D Lookup does not compile

2 views (last 30 days)
When I generate code using GRT in R2007b for 3-D Lookup blocks, I come with a source code;
/* Lookup 3-D
Search method: 'binary'
Use previous index: 'off'
Interpolation method: 'Linear'
Extrapolation method: 'Linear'
Use last breakpoint for index at or above upper limit: 'off'
*/
bpLocalVar0 = bpDataSet[0U];
bpLocalVar1 = bpDataSet[1U];
bpLocalVar2 = bpDataSet[2U];
maxIndex0 = maxIndex[0U];
maxIndex1 = maxIndex[1U];
maxIndex2 = maxIndex[2U];
maxIndex0 = plook_binx(u0, bpLocalVar0, maxIndex0, &frac);
fractions[0U] = frac;
bpIndices[0U] = maxIndex0;
...
...
But Visual Studio 2010 C++ compiler complains about the lines starting with bpLocal and says "Error C2440: cannot convert from 'void* const' to 'real_T*'. As I manualy make a type casting like
bpLocalVar0 = (realt_T*) bpDataSet[0U];
it works. Anything that I miss in code generation / optimization settings? or is there a bug in GRT tlc files for 3-D Lookup? This breaks my code generation pipeline quite severely. How can I fix it? Any ideas?
  1 Comment
TecBen
TecBen on 28 Oct 2015
Edited: TecBen on 28 Oct 2015
The same problem happens with n-D-Loop-Up table blocks also. It was fixed in new MATLAB releases greater than R2010a.

Sign in to comment.

Answers (0)

Categories

Find more on Simulink Coder in Help Center and File Exchange

Products

Community Treasure Hunt

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

Start Hunting!