20 Star 71 Fork 23

OpenHarmony / vendor_hisi_hi3861_hi3861

platform\os\Huawei_LiteOS\components\lib\libc\musl\include\time.h对应的.c函数在哪

Bug
Done
Laowang-BearPi  Opened this issue

我在调用
vendor\hisi\hi3861\hi3861\platform\os\Huawei_LiteOS\components\lib\libc\musl\include\time.h

文件中的strftime (char *__restrict, size_t, const char *__restrict, const struct tm *__restrict)时在编译时在链接的时候显示未定义:

coap_debug.c:(.text.coap_log_impl+0x15a): undefined reference to `strftime'

我猜这个应该是.h有声明 但是.c没实现,看这个目录海思应该是以lib开放,但我没找到对应的lib文件
,我觉得即使有这个lib文件应该也是不完整的

还有很多函数没有实现,如下编译报错,请问什么原因

coap_debug.c:(.text.print_readable.constprop.1+0x7c): undefined reference to __assert_fail' riscv32-unknown-elf-ld: ohos/libs/libcoap.a(coap_debug.o): in function .L106':
coap_debug.c:(.text.coap_log_impl+0xf4): undefined reference to stderr' riscv32-unknown-elf-ld: ohos/libs/libcoap.a(coap_debug.o): in function .L118':
coap_debug.c:(.text.coap_log_impl+0x15a): undefined reference to strftime' riscv32-unknown-elf-ld: ohos/libs/libcoap.a(coap_debug.o): in function .L0 ':
coap_debug.c:(.text.coap_log_impl+0x170): undefined reference to fprintf' riscv32-unknown-elf-ld: coap_debug.c:(.text.coap_log_impl+0x196): undefined reference to fprintf'
riscv32-unknown-elf-ld: ohos/libs/libcoap.a(coap_debug.o): in function .L112': coap_debug.c:(.text.coap_log_impl+0x1ba): undefined reference to fflush'
riscv32-unknown-elf-ld: ohos/libs/libcoap.a(coap_debug.o): in function .L0 ': coap_debug.c:(.text.coap_show_pdu+0x1fa): undefined reference to fprintf'
riscv32-unknown-elf-ld: ohos/libs/libcoap.a(coap_debug.o): in function .L154': coap_debug.c:(.text.coap_show_pdu+0x2ba): undefined reference to fprintf'
riscv32-unknown-elf-ld: ohos/libs/libcoap.a(coap_debug.o): in function .L158': coap_debug.c:(.text.coap_show_pdu+0x38a): undefined reference to fprintf'
riscv32-unknown-elf-ld: ohos/libs/libcoap.a(coap_io.o): in function `.L0 ':

Attachments
total 3 participants

Comments (2)

balaLaa 2020-10-29 22:19

我也遇到了,请问你现在知道是什么原因吗?

yuan.w.hong 2020-11-14 09:58 member

3861考虑小型化,裁剪了不常用的函数。libc库不是全集。

Sign in to comment

Assignees
Labels
Not set
Projects
Milestones
Branches
Planed to start
Not set
Planed to end
Not set
Top level
Priority
1
https://git.oschina.net/openharmony/vendor_hisi_hi3861_hi3861.git
git@git.oschina.net:openharmony/vendor_hisi_hi3861_hi3861.git
openharmony
vendor_hisi_hi3861_hi3861
vendor_hisi_hi3861_hi3861

Search

153430 a91d09cc 1899542 180418 42a90fc8 1899542