Matlab Coder force boolean_T to be native C99 bool type
이전 댓글 표시
How can I force matlab embedded coder to set "boolean_T" as "bool" C99 type?
Without that, I need explicit cast conversion I/O signals mapping for int->boolean_t (not needed for int->bool).
댓글 수: 1
Walter Roberson
2022년 4월 2일
Related:
답변 (1개)
Ryan Livingston
2022년 4월 3일
편집: Ryan Livingston
2022년 4월 3일
This is question was asked on StackOverflow:
https://stackoverflow.com/questions/71513527/matlab-coder-force-boolean-t-to-be-native-c99-bool-type
Here's the response I gave:
Switch up the hardware to something other than Generic->MATLAB Host Computer and you should get bool for C99:
cfg = coder.config('lib');
% Hit TAB to see other possible hardware or do
% open cfg
% and use the GUI to pick one
cfg.HardwareImplementation.ProdHWDeviceType = 'Intel->x86-64 (Linux 64)';
codegen f -args true -config cfg -report -std:c99
With MATLAB Host Computer, boolean_T is preserved in case some MATLAB libraries are pulled in to ensure binary compatibility.ave there
카테고리
도움말 센터 및 File Exchange에서 MATLAB Coder에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!