Error during Mex compilation
1 view (last 30 days)
Show older comments
Hello ALL,
I am getting error while doing Mex, need to know how it can be solved
mex MOD_sl_vl_voltage_limits.c
Error MOD_sl_vl_voltage_limits.c: .\gm_sme_code_gen_types.h: 49 invalid struct field declarations
Error MOD_sl_vl_voltage_limits.c: .\gm_sme_code_gen_types.h: 49 syntax error; found `uint8_t' expecting `}'
Error MOD_sl_vl_voltage_limits.c: .\gm_sme_code_gen_types.h: 49 skipping `uint8_t' `ACAN_IN_S_U08_St_SPEC_DCSW_HVSTO'
Error MOD_sl_vl_voltage_limits.c: .\gm_sme_code_gen_types.h: 49 empty declaration
Error MOD_sl_vl_voltage_limits.c: .\gm_sme_code_gen_types.h: 50 syntax error; found `ACAN_IN_S_U08_ACAN_RqCl_DcSw' expecting `;'
Error MOD_sl_vl_voltage_limits.c: .\gm_sme_code_gen_types.h: 65 syntax error; found `ACAN_IN_S_U08_St_V_VEH' expecting `;'
Error MOD_sl_vl_voltage_limits.c: .\gm_sme_code_gen_types.h: 66 too many errors
C:\PROGRA~1\MATLAB\R2010B\BIN\MEX.PL: Error: Compile of 'MOD_sl_vl_voltage_limits.c' failed.
0 Comments
Answers (2)
James Tursa
on 14 Mar 2014
It is possible the compiler you are using does not support the uint8_t type (or related types). If so, you might have to manually insert a define or typedef up front in the code for this. E.g.,
#define uint8_t unsigned char
0 Comments
Ken Atwell
on 14 Mar 2014
This loos like am ordinary syntax error in your C header file. What does gm_sme_code_gen_types.h looks like around line 49?
It would also be helpful too know what compiler you are using, and whether you are using a 32- or 64-bit MATLAB version of MATLAB/compiler.
0 Comments
See Also
Categories
Find more on Write C Functions Callable from MATLAB (MEX Files) in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!