Fixed Undefined Reference Error by Changing Value of BTM_OOB_INCLUDED Macro #2206
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I have tried to build the
a2dp_sink
project from the examples, where the Hands Free/Handset Profile is enabled inmake menuconfig
. The resultingsdkconfig
file that came out of this configuration can be looked at here. However, when I try to build the project, I get the following error:This error occurs because
BTM_BothEndsSupportSecureConnections
is not being included in the preprocessor output ofbtm_sec.c
, so this symbol is never defined. It is not included in the preprocessor output because of the following#if
directive from line 1601 ofbtm_sec.c
:This
#if
evaluates to false becauseBTM_OOB_INCLUDED
is defined asFALSE
on lines 736-739 ofbt_target.h
:Changing line 738 to
#define BTM_OOB_INCLUDED TRUE
fixes the error above and allows me to build thea2dp_sink.elf
file successfully. Therefore, I have made this pull request with that change in order to fix this bug. Perhaps there is a better way to fix this ifBTM_OOB_INCLUDED
is supposed to be defined in some other file, but this is the only way I could figure out how to fix the issue.