Questions about emxCreateW​rapper_uin​t16_T function

3 views (last 30 days)
Hi. I have a question about the emxCreateWrapper_uint16_T function.
I converted the function I wrote in matlab to c code for use in ccs of ti.
The code is as follows.
-------------------------------------------------------------------------------------
uint16_t dataArray3[2048];
emxArray_uint16_T *output_uint_emx;
output_uint_emx = emxCreateWrapper_uint16_T(dataArray3, 2048, 1);
cube_making(dataArray3, 1, 256, 8, output_uint_emx);
-------------------------------------------------------------------------------------
The dataArray3 array omitted the process of putting a value, but it was assigned.
And when I run this, I get an error like this.
Only the size gets the wrong value, how do I fix it?
Thank you.

Answers (1)

Angelo Yeo
Angelo Yeo on 27 Mar 2024
(1) The function emxCreateWrapper_<name> is a helper function to create emxArray data in your C/C++ code and they are included in <myFunction>_emxAPI.h in your C code. See details from the doc below.
(2) However, the error message "identifier not found" indicates that there is no prototype(definition) of the function before it was used.
(3) Here are some questions for troubleshooting. These will be helpful for you.
  • Did you use packNGo or the 'Package' option to pack the MATLAB code which you are then using in Visual Studio C++? If not, please use this option, as described in the following link, to package the MATLAB code.
  • Package generated code in ZIP file for relocation - MATLAB packNGo (mathworks.com)
  • Is the header file and the c file that you indicated included in the project in Visual Studio C++?
  • Is the function prototype defined in the header file, <myFunction>_emxAPI.h?
(4) If you are under SMS, you can consider reaching out to technical support by sending the complete project and associated files, so that they can try reproducing this issue on their end.

Categories

Find more on Simulink Coder in Help Center and File Exchange

Tags

Products

Community Treasure Hunt

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

Start Hunting!