undefined reference to esp_blufi_gap_event_handler

glrtheil
Posts: 61
Joined: Tue Dec 07, 2021 2:48 pm

Re: undefined reference to esp_blufi_gap_event_handler

Postby glrtheil » Tue Jan 25, 2022 2:35 pm

chegewara wrote:
Mon Jan 24, 2022 11:54 pm
After more digging i know what is the problem and it is a bug, which should be reported. The problem is that one of header files is not C++ compatible. You can "fix" it in you code like this:

Code: Select all

extern "C" {
#include "esp_blufi.h"
}
Unfortunately, after adding that to either my class header or cpp file, it doesn't make a difference. No errors on the include itself, but UC_BT_BLUFI_ENABLE and BLUFI_INCLUDED are still undefined.

chegewara
Posts: 2207
Joined: Wed Jun 14, 2017 9:00 pm

Re: undefined reference to esp_blufi_gap_event_handler

Postby chegewara » Tue Jan 25, 2022 2:41 pm

Like i said, UC_BT_BLUFI_ENABLE and BLUFI_INCLUDED are in esp-idf private headers, so if you dont want to change bt component it is what it is. The code with extern "C" will let you build and run app with blufi, thats all.

glrtheil
Posts: 61
Joined: Tue Dec 07, 2021 2:48 pm

Re: undefined reference to esp_blufi_gap_event_handler

Postby glrtheil » Sun Jan 30, 2022 3:56 am

Thanks for the help with this one. In the end I abandoned the c++ class I had built for blufi, and did all the blufi stuff in c. It integrates well with the rest of our c++ stuff.

matthew798
Posts: 16
Joined: Mon Jun 01, 2020 2:31 am

Re: undefined reference to esp_blufi_gap_event_handler

Postby matthew798 » Tue Feb 01, 2022 2:44 am

oh dear... Another 6 hours wasted...

Has someone submitted an issue for this?

Who is online

Users browsing this forum: No registered users and 122 guests