1

我正在尝试在 Contiki 2.7 上编译 tinygroupdtls ( tindygroupdtls )。目前,我收到链接器错误。

LD        multicast-client-example.sky
multicast-client-example.co: In function `secure_group_creation':
multicast-client-example.c:(.text.secure_group_creation+0x6): undefined reference to `dtls_new_group'
multicast-client-example.c:(.text.secure_group_creation+0x5e): undefined reference to `dtls_cipher_new'
multicast-client-example.c:(.text.secure_group_creation+0x6c): undefined reference to `dtls_add_group'
contiki-sky.a(er-coap-13.o): In function `dtls_config_context':
er-coap-13.c:(.text.dtls_config_context+0xa): undefined reference to `dtls_new_context'
contiki-sky.a(er-coap-13.o): In function `coap_send_message':
er-coap-13.c:(.text.coap_send_message+0x48): undefined reference to `dtls_write'
contiki-sky.a(er-coap-13-engi): In function `process_thread_coap_receiver':
er-coap-13-engine.c:(.text.process_thread_coap_receiver+0x1c): undefined reference to `dtls_init'
er-coap-13-engine.c:(.text.process_thread_coap_receiver+0xaa): undefined reference to `dtls_handle_message'
collect2: error: ld returned 1 exit status
make: *** [multicast-client-example.sky] Error 1
Process returned error code 2
rm multicast-client-example.co obj_sky/contiki-sky-main.o

我不确定 tinygroupdtls 文件夹中的源文件是否正在编译,并导致此问题...

以下是我的makefile:

项目生成文件

all: multicast-client-example server-example


# variable for this Makefile
# configure CoAP implementation (3|7|12|13) (er-coap-07 also supports CoAP draft 08)
WITH_COAP=13
WITH_CONTIKI=1
# variable for Makefile.include
WITH_UIP6=1
# for some platforms
UIP_CONF_IPV6=1
CFLAGS += -DUIP_CONF_IPV6=1


CONTIKI=../..
CFLAGS += -DPROJECT_CONF_H=\"project-conf.h\"


# linker optimizations
SMALL=1

# REST framework, requires WITH_COAP
ifeq ($(WITH_COAP), 13)
${info INFO: compiling with CoAP-13}
CFLAGS += -DWITH_COAP=13
CFLAGS += -DREST=coap_rest_implementation
CFLAGS += -DUIP_CONF_TCP=0
APPS += er-coap-13-mcast-dtls
endif

CFLAGS += -DWITH_COAP=13 -DWITH_CONTIKI=1 -DUIP_CONF_IPV6=1
CFLAGS += -DUIP_CONF_IPV6_RPL=0
CFLAGS += -DNDEBUG=0
#CFLAGS += -DDEBUG=1
CFLAGS += -DWITH_MULTICAST=1
CFLAGS += -DWITH_GROUP_RESPONSE=1

CFLAGS += -DWITH_DTLS=1
APPS += tinygroupdtls/aes tinygroupdtls/sha2 tinygroupdtls

APPS += erbium


include $(CONTIKI)/Makefile.include

应用程序生成文件 (Makefile.tinygroupdtls)

ifeq ($(WITH_GROUP_RESPONSE), 1)
tinygroupdtls_src = dtls.c crypto.c hmac.c rijndael.c sha2.c ccm.c netq.c dtls_time.c peer.c group.c key_derivation.c
else
tinygroupdtls_src = dtls.c crypto.c hmac.c rijndael.c sha2.c ccm.c netq.c dtls_time.c peer.c group.c
endif

谁能告诉我我在这里做错了什么?

谢谢

4

0 回答 0