- 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?
Questions about emxCreateWrapper_uint16_T function
3 次查看(过去 30 天)
显示 更早的评论
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.![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1653291/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1653291/image.png)
Only the size gets the wrong value, how do I fix it?
Thank you.
0 个评论
回答(1 个)
Angelo Yeo
2024-3-27
(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.
(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.
0 个评论
另请参阅
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!