Error during Mex compilation
6 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
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 Commenti
Risposte (2)
James Tursa
il 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 Commenti
Ken Atwell
il 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 Commenti
Vedere anche
Categorie
Scopri di più su Write C Functions Callable from MATLAB (MEX Files) in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!