基于这个实验https://bbs.huaweicloud.com/blogs/140367,编译的时候失败了
[2020-12-01 20:42:47] 符号库初始化扫描中...
[2020-12-01 20:42:50] 符号库初始化成功!
[2020-12-01 20:47:19] 开始编译...
Compiling mbed_port.c...
D:/LiteOS_Lab_STM32_V5/iot_link/network/dtls/mbedtls/mbedtls_port/mbed_port.c:62:1: error: unknown type name 'en_dtls_al_err_t'; did you mean 'mbedtls_ssl_recv_t'? en_dtls_al_err_t mbed_new(dtls_al_para_t *para, void **handle) ^~~~~~~~~~~~~~~~ mbedtls_ssl_recv_t
D:/LiteOS_Lab_STM32_V5/iot_link/network/dtls/mbedtls/mbedtls_port/mbed_port.c:62:27: error: unknown type name 'dtls_al_para_t' en_dtls_al_err_t mbed_new(dtls_al_para_t *para, void **handle) ^~~~~~~~~~~~~~D:/LiteOS_Lab_STM32_V5/iot_link/network/dtls/mbedtls/mbedtls_port/mbed_port.c:127:1: error: unknown type name 'en_dtls_al_err_t'; did you mean 'mbedtls_ssl_recv_t'? en_dtls_al_err_t mbed_destroy(void *handle) ^~~~~~~~~~~~~~~~ mbedtls_ssl_recv_t
D:/LiteOS_Lab_STM32_V5/iot_link/network/dtls/mbedtls/mbedtls_port/mbed_port.c: In function 'mbed_destroy': D:/LiteOS_Lab_STM32_V5/iot_link/network/dtls/mbedtls/mbedtls_port/mbed_port.c:129:15: error: 'EN_DTLS_AL_ERR_PARA' undeclared (first use in this function) int ret = EN_DTLS_AL_ERR_PARA; ^~~~~~~~~~~~~~~~~~~ D:/LiteOS_Lab_STM32_V5/iot_link/network/dtls/mbedtls/mbedtls_port/mbed_port.c:129:15: note: each undeclared identifier is reported only once for each function it appears in
D:/LiteOS_Lab_STM32_V5/iot_link/network/dtls/mbedtls/mbedtls_port/mbed_port.c:133:15: error: 'EN_DTLS_AL_ERR_OK' undeclared (first use in this function); did you mean 'EN_DTLS_AL_ERR_PARA'?
ret = EN_DTLS_AL_ERR_OK;
^~~~~~~~~~~~~~~~~
EN_DTLS_AL_ERR_PARA
D:/LiteOS_Lab_STM32_V5/iot_link/network/dtls/mbedtls/mbedtls_port/mbed_port.c: At top level:
D:/LiteOS_Lab_STM32_V5/iot_link/network/dtls/mbedtls/mbedtls_port/mbed_port.c:185:14: error: unknown type name 'dtls_al_t'
static const dtls_al_t s_mbedtls_io =
^~~~~~~~~
D:/LiteOS_Lab_STM32_V5/iot_link/network/dtls/mbedtls/mbedtls_port/mbed_port.c:187:5: error: field name not in record or union initializer
.name = "mbed",
^
D:/LiteOS_Lab_STM32_V5/iot_link/network/dtls/mbedtls/mbedtls_port/mbed_port.c:187:5: note: (near initialization for 's_mbedtls_io')
D:/LiteOS_Lab_STM32_V5/iot_link/network/dtls/mbedtls/mbedtls_port/mbed_port.c:187:13: warning: initialization makes integer from pointer without a cast [-Wint-conversion]
.name = "mbed",
^~~~~~
D:/LiteOS_Lab_STM32_V5/iot_link/network/dtls/mbedtls/mbedtls_port/mbed_port.c:187:13: note: (near initialization for 's_mbedtls_io')
D:/LiteOS_Lab_STM32_V5/iot_link/network/dtls/mbedtls/mbedtls_port/mbed_port.c:188:5: error: field name not in record or union initializer
.io = {
^
D:/LiteOS_Lab_STM32_V5/iot_link/network/dtls/mbedtls/mbedtls_port/mbed_port.c:188:5: note: (near initialization for 's_mbedtls_io')
D:/LiteOS_Lab_STM32_V5/iot_link/network/dtls/mbedtls/mbedtls_port/mbed_port.c:188:5: warning: braces around scalar initializer
D:/LiteOS_Lab_STM32_V5/iot_link/network/dtls/mbedtls/mbedtls_port/mbed_port.c:188:5: note: (near initialization for 's_mbedtls_io')
D:/LiteOS_Lab_STM32_V5/iot_link/network/dtls/mbedtls/mbedtls_port/mbed_port.c:189:13: error: field name not in record or union initializer
.io_new = mbed_new,
^
D:/LiteOS_Lab_STM32_V5/iot_link/network/dtls/mbedtls/mbedtls_port/mbed_port.c:189:13: note: (near initialization for 's_mbedtls_io')
D:/LiteOS_Lab_STM32_V5/iot_link/network/dtls/mbedtls/mbedtls_port/mbed_port.c:189:23: error: 'mbed_new' undeclared here (not in a function); did you mean 'mbed_read'?
.io_new = mbed_new,
^~~~~~~~
mbed_read
D:/LiteOS_Lab_STM32_V5/iot_link/network/dtls/mbedtls/mbedtls_port/mbed_port.c:190:13: error: field name not in record or union initializer
.io_connect = mbed_connect,
^
D:/LiteOS_Lab_STM32_V5/iot_link/network/dtls/mbedtls/mbedtls_port/mbed_port.c:190:13: note: (near initialization for 's_mbedtls_io')
D:/LiteOS_Lab_STM32_V5/iot_link/network/dtls/mbedtls/mbedtls_port/mbed_port.c:190:27: warning: excess elements in scalar initializer
.io_connect = mbed_connect,
^~~~~~~~~~~~
D:/LiteOS_Lab_STM32_V5/iot_link/network/dtls/mbedtls/mbedtls_port/mbed_port.c:190:27: note: (near initialization for 's_mbedtls_io')
D:/LiteOS_Lab_STM32_V5/iot_link/network/dtls/mbedtls/mbedtls_port/mbed_port.c:191:13: error: field name not in record or union initializer
.io_read = mbed_read,
^
D:/LiteOS_Lab_STM32_V5/iot_link/network/dtls/mbedtls/mbedtls_port/mbed_port.c:191:13: note: (near initialization for 's_mbedtls_io')
D:/LiteOS_Lab_STM32_V5/iot_link/network/dtls/mbedtls/mbedtls_port/mbed_port.c:191:24: warning: excess elements in scalar initializer
.io_read = mbed_read,
^~~~~~~~~
D:/LiteOS_Lab_STM32_V5/iot_link/network/dtls/mbedtls/mbedtls_port/mbed_port.c:191:24: note: (near initialization for 's_mbedtls_io')
D:/LiteOS_Lab_STM32_V5/iot_link/network/dtls/mbedtls/mbedtls_port/mbed_port.c:192:13: error: field name not in record or union initializer
.io_write = mbed_write,
^
D:/LiteOS_Lab_STM32_V5/iot_link/network/dtls/mbedtls/mbedtls_port/mbed_port.c:192:13: note: (near initialization for 's_mbedtls_io')
D:/LiteOS_Lab_STM32_V5/iot_link/network/dtls/mbedtls/mbedtls_port/mbed_port.c:192:25: warning: excess elements in scalar initializer
.io_write = mbed_write,
^~~~~~~~~~
D:/LiteOS_Lab_STM32_V5/iot_link/network/dtls/mbedtls/mbedtls_port/mbed_port.c:192:25: note: (near initialization for 's_mbedtls_io')
D:/LiteOS_Lab_STM32_V5/iot_link/network/dtls/mbedtls/mbedtls_port/mbed_port.c:193:13: error: field name not in record or union initializer
.io_destroy = mbed_destroy,
^
D:/LiteOS_Lab_STM32_V5/iot_link/network/dtls/mbedtls/mbedtls_port/mbed_port.c:193:13: note: (near initialization for 's_mbedtls_io')
D:/LiteOS_Lab_STM32_V5/iot_link/network/dtls/mbedtls/mbedtls_port/mbed_port.c:193:27: warning: excess elements in scalar initializer
.io_destroy = mbed_destroy,
^~~~~~~~~~~~
D:/LiteOS_Lab_STM32_V5/iot_link/network/dtls/mbedtls/mbedtls_port/mbed_port.c:193:27: note: (near initialization for 's_mbedtls_io')
D:/LiteOS_Lab_STM32_V5/iot_link/network/dtls/mbedtls/mbedtls_port/mbed_port.c:188:11: warning: excess elements in scalar initializer
.io = {
^
D:/LiteOS_Lab_STM32_V5/iot_link/network/dtls/mbedtls/mbedtls_port/mbed_port.c:188:11: note: (near initialization for 's_mbedtls_io')
14 Error(s), 7 Warning(s).
exit code=2
[2020-12-01 20:47:22] 编译失败。
D:/LiteOS_Lab_STM32_V5/iot_link/network/dtls/mbedtls/mbedtls_port/mbed_port.c: In function 'dtls_imp_init': D:/LiteOS_Lab_STM32_V5/iot_link/network/dtls/mbedtls/mbedtls_port/mbed_port.c:206:11: warning: implicit declaration of function 'dtls_al_install'; did you mean 'dtls_imp_init'? [-Wimplicit-function-declaration] ret = dtls_al_install(&s_mbedtls_io); ^~~~~~~~~~~~~~~ dtls_imp_init At top level: D:/LiteOS_Lab_STM32_V5/iot_link/network/dtls/mbedtls/mbedtls_port/mbed_port.c:47:13: warning: 'mbed_port_debug' defined but not used [-Wunused-function] static void mbed_port_debug( void *ctx, int level, ^~~~~~~~~~~~~~~ make: *** [Makefile:156: appbuild/mbed_port.o] Error 1