I have the problem with compilation. After adding function call otThreadGetMaxAllowedChildren() in the openthread/examples/apps/cli/main.c
I got an error:
openthread/examples/apps/cli/main.c:228: undefined reference to `otThreadGetMaxAllowedChildren'
Similary, the same issue with otThreadGetChildInfoByIndex() :
openthread/examples/apps/cli/main.c:204: undefined reference to `otThreadGetChildInfoByIndex'
I have added -DOPENTHREAD_FTD=1
flag, but error still occurs.
Any idea what should I do to make compilation successful?
The otThreadGetChildInfoByIndex()
is only available for FTD builds.
You should either:
Disable MTD and RCP in your build options, or
Wrap your child table code with #if OPENTHREAD_FTD
.
You can refer to the CLI code for example usage.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.