What is tmwtypes.h and how do I fix an error of it not being seen? Also, general Coder questions.
298 次查看(过去 30 天)
显示 更早的评论
So, I've got a function that runs in MATLAB and I have used the MATLAB Coder to convert to C/C++ code. I am doing this to get the MATLAB code onto an existing Android App. I have followed the "MATLAB to iPhone and Android Made Easy" this far. The code compiles and I can move it into my cpp file. When I compile my app, I get an error that says my code can't find "tmwtypes.h." I'm curious first as to what it does/means and how I can fix the error? I am also worried that it might be my makefile that is giving the error.
As a sidenote, I also noticed that the Coder made some .dll files. From my understanding, these won't work on Android so I was curious if maybe that means I am doing something wrong? I have used the Coder to make source code so I think I'm in the right area but I wanted to make this post to be 100% sure.
My code was written in 2014b MATLAB but I am using R2018a for compiling and the Microsoft Windows SDK v7.1. My target device is Generic and Unspecified (assume 32-bit Generic).
Thanks,
Blaine Minden
2 个评论
Anakin Zheng
2018-12-18
Hi Blaine,
Can you share some details about how you compile the code? Since 18a does not support SDK 7.1, I assume you write your own Makefile. Can you share more details?
Thanks
Anakin
回答(2 个)
cui,xingxing
2019-10-12
编辑:cui,xingxing
2024-4-27,2:02
it is here: C:\Program Files\MATLAB\R2019a\extern\include
-------------------------Off-topic interlude, 2024-------------------------------
I am currently looking for a job in the field of CV algorithm development, based in Shenzhen, Guangdong, China,or a remote support position. I would be very grateful if anyone is willing to offer me a job or make a recommendation. My preliminary resume can be found at: https://cuixing158.github.io/about/ . Thank you!
Email: cuixingxing150@gmail.com
0 个评论
Mordechai Rorvig
2019-1-21
Hi Blaine,
The file tmwtypes.h contains type definitions that are needed by the generated code. You can read more about it in the doc page Mapping MATLAB Types to Types in Generated Code. If you use the packNGo function, the tmwtypes.h file is zipped up with the rest of the generated code files (if it is needed). You can then use that zip file to transfer all the needed files for your generated code. If you use this method then the tmwtypes.h file stored with the rest of the source files should be discoverable by your compiler.
The presence of dll files does not indicate that anything is wrong about your generated C source files. MATLAB Coder generates dll files, for example, if you have chosen a dynamic library for your code generation configuration object:
cfg = coder.config('dll');
For your hardware settings, you will want to select your device on the Hardware pane of the configuration settings.
open cfg;
Choose 'None - Select device below' for Hardware Board and then set the Device vendor and Device type to match the specifications of your external device. These settings control the hardware implementation parameters and other assumptions which can be important for attaining the correct generated code behavior on the target device.
3 个评论
Patrick Haus
2022-1-10
Ken, I am experiencing that exact error and was wondering if you know of a workaround?
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!