[etherlab-users] ec_slave3.c

Hasan atieh hasan-atieh at hotmail.co.uk
Tue Jul 3 16:00:02 CEST 2018


Hello,
I know that before building the Simulink model I have to run the following command:
“mex ec_slave3.c”
So when I do that I get the long list of errors below. I saw that someone faced this problem too but I saw no response to his mail.
I am using MATLAB 2017b & the current version of etherlab which is etherlab2.1.0.

Error using mex
ec_slave3.c
C:\Users\hasan\Desktop\Programs\Matlab\EtherLab\etherlab-2.1.0\rtw\blocks\EtherCAT\ec_slave3.c(217):
warning C4005: 'max': macro redefinition
C:\Program Files (x86)\Windows Kits\10\\include\10.0.17134.0\ucrt\stdlib.h(1289): note: see previous
definition of 'max'
C:\Users\hasan\Desktop\Programs\Matlab\EtherLab\etherlab-2.1.0\rtw\blocks\EtherCAT\ec_slave3.c(337): error
C2084: function 'int vsnprintf(char *const ,const size_t,const char *const ,va_list)' already has a body
C:\Program Files (x86)\Windows Kits\10\\include\10.0.17134.0\ucrt\stdio.h(1430): note: see previous
definition of 'vsnprintf'
C:\Users\hasan\Desktop\Programs\Matlab\EtherLab\etherlab-2.1.0\rtw\blocks\EtherCAT\ec_slave3.c(354): error
C2084: function 'int snprintf(char *const ,const size_t,const char *const ,...)' already has a body
C:\Program Files (x86)\Windows Kits\10\\include\10.0.17134.0\ucrt\stdio.h(1940): note: see previous
definition of 'snprintf'
C:\Users\hasan\Desktop\Programs\Matlab\EtherLab\etherlab-2.1.0\rtw\blocks\EtherCAT\ec_slave3.c(557):
warning C4267: '=': conversion from 'size_t' to 'uint_T', possible loss of data
C:\Users\hasan\Desktop\Programs\Matlab\EtherLab\etherlab-2.1.0\rtw\blocks\EtherCAT\ec_slave3.c(576):
warning C4267: '=': conversion from 'size_t' to 'uint_T', possible loss of data
C:\Users\hasan\Desktop\Programs\Matlab\EtherLab\etherlab-2.1.0\rtw\blocks\EtherCAT\ec_slave3.c(632):
warning C4244: '=': conversion from 'real_T' to 'uint_T', possible loss of data
C:\Users\hasan\Desktop\Programs\Matlab\EtherLab\etherlab-2.1.0\rtw\blocks\EtherCAT\ec_slave3.c(636):
warning C4244: '=': conversion from 'real_T' to 'uint_T', possible loss of data
C:\Users\hasan\Desktop\Programs\Matlab\EtherLab\etherlab-2.1.0\rtw\blocks\EtherCAT\ec_slave3.c(640):
warning C4244: '=': conversion from 'real_T' to 'uint_T', possible loss of data
C:\Users\hasan\Desktop\Programs\Matlab\EtherLab\etherlab-2.1.0\rtw\blocks\EtherCAT\ec_slave3.c(644):
warning C4244: '=': conversion from 'real_T' to 'uint_T', possible loss of data
C:\Users\hasan\Desktop\Programs\Matlab\EtherLab\etherlab-2.1.0\rtw\blocks\EtherCAT\ec_slave3.c(673):
warning C4244: '=': conversion from 'real_T' to 'uint16_T', possible loss of data
C:\Users\hasan\Desktop\Programs\Matlab\EtherLab\etherlab-2.1.0\rtw\blocks\EtherCAT\ec_slave3.c(677):
warning C4267: '=': conversion from 'size_t' to 'uint_T', possible loss of data
C:\Users\hasan\Desktop\Programs\Matlab\EtherLab\etherlab-2.1.0\rtw\blocks\EtherCAT\ec_slave3.c(696):
warning C4244: '=': conversion from 'const real_T' to 'uint16_T', possible loss of data
C:\Users\hasan\Desktop\Programs\Matlab\EtherLab\etherlab-2.1.0\rtw\blocks\EtherCAT\ec_slave3.c(697):
warning C4244: '=': conversion from 'const real_T' to 'uint8_T', possible loss of data
C:\Users\hasan\Desktop\Programs\Matlab\EtherLab\etherlab-2.1.0\rtw\blocks\EtherCAT\ec_slave3.c(698):
warning C4244: '=': conversion from 'const real_T' to 'uint_T', possible loss of data
C:\Users\hasan\Desktop\Programs\Matlab\EtherLab\etherlab-2.1.0\rtw\blocks\EtherCAT\ec_slave3.c(726):
warning C4244: '=': conversion from 'real_T' to 'uint16_T', possible loss of data
C:\Users\hasan\Desktop\Programs\Matlab\EtherLab\etherlab-2.1.0\rtw\blocks\EtherCAT\ec_slave3.c(736):
warning C4267: '=': conversion from 'size_t' to 'uint_T', possible loss of data
C:\Users\hasan\Desktop\Programs\Matlab\EtherLab\etherlab-2.1.0\rtw\blocks\EtherCAT\ec_slave3.c(791):
warning C4267: 'function': conversion from 'size_t' to 'uint_T', possible loss of data
C:\Users\hasan\Desktop\Programs\Matlab\EtherLab\etherlab-2.1.0\rtw\blocks\EtherCAT\ec_slave3.c(792):
warning C4244: '=': conversion from 'real_T' to 'uint16_T', possible loss of data
C:\Users\hasan\Desktop\Programs\Matlab\EtherLab\etherlab-2.1.0\rtw\blocks\EtherCAT\ec_slave3.c(796):
warning C4267: 'function': conversion from 'size_t' to 'uint_T', possible loss of data
C:\Users\hasan\Desktop\Programs\Matlab\EtherLab\etherlab-2.1.0\rtw\blocks\EtherCAT\ec_slave3.c(797):
warning C4244: '=': conversion from 'real_T' to 'int16_T', possible loss of data
C:\Users\hasan\Desktop\Programs\Matlab\EtherLab\etherlab-2.1.0\rtw\blocks\EtherCAT\ec_slave3.c(806):
warning C4267: 'function': conversion from 'size_t' to 'uint_T', possible loss of data
C:\Users\hasan\Desktop\Programs\Matlab\EtherLab\etherlab-2.1.0\rtw\blocks\EtherCAT\ec_slave3.c(807):
warning C4244: '=': conversion from 'real_T' to 'size_t', possible loss of data
C:\Users\hasan\Desktop\Programs\Matlab\EtherLab\etherlab-2.1.0\rtw\blocks\EtherCAT\ec_slave3.c(810):
warning C4267: 'function': conversion from 'size_t' to 'int', possible loss of data
C:\Users\hasan\Desktop\Programs\Matlab\EtherLab\etherlab-2.1.0\rtw\blocks\EtherCAT\ec_slave3.c(853):
warning C4244: '=': conversion from 'real_T' to 'uint_T', possible loss of data
C:\Users\hasan\Desktop\Programs\Matlab\EtherLab\etherlab-2.1.0\rtw\blocks\EtherCAT\ec_slave3.c(859):
warning C4267: '=': conversion from 'size_t' to 'uint_T', possible loss of data
C:\Users\hasan\Desktop\Programs\Matlab\EtherLab\etherlab-2.1.0\rtw\blocks\EtherCAT\ec_slave3.c(865):
warning C4244: '=': conversion from 'real_T' to 'uint8_T', possible loss of data
C:\Users\hasan\Desktop\Programs\Matlab\EtherLab\etherlab-2.1.0\rtw\blocks\EtherCAT\ec_slave3.c(929):
warning C4267: 'function': conversion from 'size_t' to 'uint_T', possible loss of data
C:\Users\hasan\Desktop\Programs\Matlab\EtherLab\etherlab-2.1.0\rtw\blocks\EtherCAT\ec_slave3.c(930):
warning C4244: '=': conversion from 'real_T' to 'uint16_T', possible loss of data
C:\Users\hasan\Desktop\Programs\Matlab\EtherLab\etherlab-2.1.0\rtw\blocks\EtherCAT\ec_slave3.c(933):
warning C4267: 'function': conversion from 'size_t' to 'int', possible loss of data
C:\Users\hasan\Desktop\Programs\Matlab\EtherLab\etherlab-2.1.0\rtw\blocks\EtherCAT\ec_slave3.c(947):
warning C4267: 'function': conversion from 'size_t' to 'int', possible loss of data
C:\Users\hasan\Desktop\Programs\Matlab\EtherLab\etherlab-2.1.0\rtw\blocks\EtherCAT\ec_slave3.c(964):
warning C4244: '=': conversion from 'real_T' to 'uint8_T', possible loss of data
C:\Users\hasan\Desktop\Programs\Matlab\EtherLab\etherlab-2.1.0\rtw\blocks\EtherCAT\ec_slave3.c(1009):
warning C4244: '=': conversion from 'const real_T' to 'uint16_T', possible loss of data
C:\Users\hasan\Desktop\Programs\Matlab\EtherLab\etherlab-2.1.0\rtw\blocks\EtherCAT\ec_slave3.c(1014):
warning C4244: '=': conversion from 'const real_T' to 'int32_T', possible loss of data
C:\Users\hasan\Desktop\Programs\Matlab\EtherLab\etherlab-2.1.0\rtw\blocks\EtherCAT\ec_slave3.c(1015):
warning C4244: '=': conversion from 'const real_T' to 'int32_T', possible loss of data
C:\Users\hasan\Desktop\Programs\Matlab\EtherLab\etherlab-2.1.0\rtw\blocks\EtherCAT\ec_slave3.c(1016):
warning C4244: '=': conversion from 'const real_T' to 'int32_T', possible loss of data
C:\Users\hasan\Desktop\Programs\Matlab\EtherLab\etherlab-2.1.0\rtw\blocks\EtherCAT\ec_slave3.c(1017):
warning C4244: '=': conversion from 'const real_T' to 'int32_T', possible loss of data
C:\Users\hasan\Desktop\Programs\Matlab\EtherLab\etherlab-2.1.0\rtw\blocks\EtherCAT\ec_slave3.c(1019):
warning C4244: '=': conversion from 'const real_T' to 'int32_T', possible loss of data
C:\Users\hasan\Desktop\Programs\Matlab\EtherLab\etherlab-2.1.0\rtw\blocks\EtherCAT\ec_slave3.c(1020):
warning C4244: '=': conversion from 'const real_T' to 'int32_T', possible loss of data
C:\Users\hasan\Desktop\Programs\Matlab\EtherLab\etherlab-2.1.0\rtw\blocks\EtherCAT\ec_slave3.c(1021):
warning C4244: '=': conversion from 'const real_T' to 'int32_T', possible loss of data
C:\Users\hasan\Desktop\Programs\Matlab\EtherLab\etherlab-2.1.0\rtw\blocks\EtherCAT\ec_slave3.c(1022):
warning C4244: '=': conversion from 'const real_T' to 'int32_T', possible loss of data
C:\Users\hasan\Desktop\Programs\Matlab\EtherLab\etherlab-2.1.0\rtw\blocks\EtherCAT\ec_slave3.c(1063):
warning C4244: '=': conversion from 'real_T' to 'uint32_T', possible loss of data
C:\Users\hasan\Desktop\Programs\Matlab\EtherLab\etherlab-2.1.0\rtw\blocks\EtherCAT\ec_slave3.c(1067):
warning C4244: '=': conversion from 'real_T' to 'uint32_T', possible loss of data
C:\Users\hasan\Desktop\Programs\Matlab\EtherLab\etherlab-2.1.0\rtw\blocks\EtherCAT\ec_slave3.c(1095):
warning C4267: '=': conversion from 'size_t' to 'uint_T', possible loss of data
C:\Users\hasan\Desktop\Programs\Matlab\EtherLab\etherlab-2.1.0\rtw\blocks\EtherCAT\ec_slave3.c(1111):
warning C4267: 'function': conversion from 'size_t' to 'int', possible loss of data
C:\Users\hasan\Desktop\Programs\Matlab\EtherLab\etherlab-2.1.0\rtw\blocks\EtherCAT\ec_slave3.c(1192):
warning C4267: 'function': conversion from 'size_t' to 'int', possible loss of data
C:\Users\hasan\Desktop\Programs\Matlab\EtherLab\etherlab-2.1.0\rtw\blocks\EtherCAT\ec_slave3.c(1210):
warning C4267: '+=': conversion from 'size_t' to 'int_T', possible loss of data
C:\Users\hasan\Desktop\Programs\Matlab\EtherLab\etherlab-2.1.0\rtw\blocks\EtherCAT\ec_slave3.c(1224):
warning C4267: '=': conversion from 'size_t' to 'int32_T', possible loss of data
C:\Users\hasan\Desktop\Programs\Matlab\EtherLab\etherlab-2.1.0\rtw\blocks\EtherCAT\ec_slave3.c(1372):
warning C4244: '+=': conversion from 'const real_T' to 'uint_T', possible loss of data
C:\Users\hasan\Desktop\Programs\Matlab\EtherLab\etherlab-2.1.0\rtw\blocks\EtherCAT\ec_slave3.c(1323):
warning C4244: 'initializing': conversion from 'double' to 'uint_T', possible loss of data
C:\Users\hasan\Desktop\Programs\Matlab\EtherLab\etherlab-2.1.0\rtw\blocks\EtherCAT\ec_slave3.c(1396):
warning C4267: 'function': conversion from 'size_t' to 'int', possible loss of data
C:\Users\hasan\Desktop\Programs\Matlab\EtherLab\etherlab-2.1.0\rtw\blocks\EtherCAT\ec_slave3.c(1416): error
C2065: 'ssize_t': undeclared identifier
C:\Users\hasan\Desktop\Programs\Matlab\EtherLab\etherlab-2.1.0\rtw\blocks\EtherCAT\ec_slave3.c(1416): error
C2146: syntax error: missing ')' before identifier 'val'
C:\Users\hasan\Desktop\Programs\Matlab\EtherLab\etherlab-2.1.0\rtw\blocks\EtherCAT\ec_slave3.c(1417): error
C2059: syntax error: ')'
C:\Users\hasan\Desktop\Programs\Matlab\EtherLab\etherlab-2.1.0\rtw\blocks\EtherCAT\ec_slave3.c(1433): error
C2065: 'ssize_t': undeclared identifier
C:\Users\hasan\Desktop\Programs\Matlab\EtherLab\etherlab-2.1.0\rtw\blocks\EtherCAT\ec_slave3.c(1433): error
C2146: syntax error: missing ')' before identifier 'val'
C:\Users\hasan\Desktop\Programs\Matlab\EtherLab\etherlab-2.1.0\rtw\blocks\EtherCAT\ec_slave3.c(1434): error
C2059: syntax error: ')'
C:\Users\hasan\Desktop\Programs\Matlab\EtherLab\etherlab-2.1.0\rtw\blocks\EtherCAT\ec_slave3.c(1444): error
C2065: 'ssize_t': undeclared identifier
C:\Users\hasan\Desktop\Programs\Matlab\EtherLab\etherlab-2.1.0\rtw\blocks\EtherCAT\ec_slave3.c(1444): error
C2146: syntax error: missing ')' before identifier 'val'
C:\Users\hasan\Desktop\Programs\Matlab\EtherLab\etherlab-2.1.0\rtw\blocks\EtherCAT\ec_slave3.c(1445): error
C2059: syntax error: ')'
C:\Users\hasan\Desktop\Programs\Matlab\EtherLab\etherlab-2.1.0\rtw\blocks\EtherCAT\ec_slave3.c(1466):
warning C4244: '=': conversion from 'real_T' to 'size_t', possible loss of data
C:\Users\hasan\Desktop\Programs\Matlab\EtherLab\etherlab-2.1.0\rtw\blocks\EtherCAT\ec_slave3.c(1472): error
C2065: 'ssize_t': undeclared identifier
C:\Users\hasan\Desktop\Programs\Matlab\EtherLab\etherlab-2.1.0\rtw\blocks\EtherCAT\ec_slave3.c(1472): error
C2146: syntax error: missing ')' before identifier 'val'
C:\Users\hasan\Desktop\Programs\Matlab\EtherLab\etherlab-2.1.0\rtw\blocks\EtherCAT\ec_slave3.c(1489):
warning C4267: 'function': conversion from 'size_t' to 'uint_T', possible loss of data
C:\Users\hasan\Desktop\Programs\Matlab\EtherLab\etherlab-2.1.0\rtw\blocks\EtherCAT\ec_slave3.c(1493):
warning C4267: 'function': conversion from 'size_t' to 'uint_T', possible loss of data
C:\Users\hasan\Desktop\Programs\Matlab\EtherLab\etherlab-2.1.0\rtw\blocks\EtherCAT\ec_slave3.c(1495):
warning C4267: 'function': conversion from 'size_t' to 'uint_T', possible loss of data
C:\Users\hasan\Desktop\Programs\Matlab\EtherLab\etherlab-2.1.0\rtw\blocks\EtherCAT\ec_slave3.c(1499):
warning C4267: 'function': conversion from 'size_t' to 'uint_T', possible loss of data
C:\Users\hasan\Desktop\Programs\Matlab\EtherLab\etherlab-2.1.0\rtw\blocks\EtherCAT\ec_slave3.c(1502):
warning C4244: '+=': conversion from '__int64' to 'int_T', possible loss of data
C:\Users\hasan\Desktop\Programs\Matlab\EtherLab\etherlab-2.1.0\rtw\blocks\EtherCAT\ec_slave3.c(1508):
warning C4267: 'function': conversion from 'size_t' to 'uint_T', possible loss of data
C:\Users\hasan\Desktop\Programs\Matlab\EtherLab\etherlab-2.1.0\rtw\blocks\EtherCAT\ec_slave3.c(1554):
warning C4267: '=': conversion from 'size_t' to 'uint_T', possible loss of data
C:\Users\hasan\Desktop\Programs\Matlab\EtherLab\etherlab-2.1.0\rtw\blocks\EtherCAT\ec_slave3.c(1574):
warning C4267: 'function': conversion from 'size_t' to 'int', possible loss of data
C:\Users\hasan\Desktop\Programs\Matlab\EtherLab\etherlab-2.1.0\rtw\blocks\EtherCAT\ec_slave3.c(1608):
warning C4244: 'return': conversion from '__int64' to 'int_T', possible loss of data
C:\Users\hasan\Desktop\Programs\Matlab\EtherLab\etherlab-2.1.0\rtw\blocks\EtherCAT\ec_slave3.c(1736):
warning C4244: '=': conversion from 'double' to 'unsigned int', possible loss of data
C:\Users\hasan\Desktop\Programs\Matlab\EtherLab\etherlab-2.1.0\rtw\blocks\EtherCAT\ec_slave3.c(1746):
warning C4244: 'function': conversion from '__int64' to 'int_T', possible loss of data
C:\Users\hasan\Desktop\Programs\Matlab\EtherLab\etherlab-2.1.0\rtw\blocks\EtherCAT\ec_slave3.c(1755):
warning C4244: 'function': conversion from '__int64' to 'int_T', possible loss of data
C:\Users\hasan\Desktop\Programs\Matlab\EtherLab\etherlab-2.1.0\rtw\blocks\EtherCAT\ec_slave3.c(1759):
warning C4244: '=': conversion from '__int64' to 'int_T', possible loss of data
C:\Users\hasan\Desktop\Programs\Matlab\EtherLab\etherlab-2.1.0\rtw\blocks\EtherCAT\ec_slave3.c(1854):
warning C4018: '>': signed/unsigned mismatch
C:\Users\hasan\Desktop\Programs\Matlab\EtherLab\etherlab-2.1.0\rtw\blocks\EtherCAT\ec_slave3.c(1849):
warning C4244: 'initializing': conversion from '__int64' to 'uint_T', possible loss of data
C:\Users\hasan\Desktop\Programs\Matlab\EtherLab\etherlab-2.1.0\rtw\blocks\EtherCAT\ec_slave3.c(1901):
warning C4244: '=': conversion from '__int64' to 'int_T', possible loss of data
C:\Users\hasan\Desktop\Programs\Matlab\EtherLab\etherlab-2.1.0\rtw\blocks\EtherCAT\ec_slave3.c(2090):
warning C4267: '=': conversion from 'size_t' to 'uint32_T', possible loss of data
C:\Users\hasan\Desktop\Programs\Matlab\EtherLab\etherlab-2.1.0\rtw\blocks\EtherCAT\ec_slave3.c(2267):
warning C4244: '=': conversion from '__int64' to 'uint32_T', possible loss of data
C:\Users\hasan\Desktop\Programs\Matlab\EtherLab\etherlab-2.1.0\rtw\blocks\EtherCAT\ec_slave3.c(2236):
warning C4244: 'initializing': conversion from '__int64' to 'uint_T', possible loss of data
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.etherlab.org/pipermail/etherlab-users/attachments/20180703/5e85a6d8/attachment-0002.htm>


More information about the Etherlab-users mailing list