Page 2 of 2
Re: undefined reference to esp_blufi_gap_event_handler
Posted: Tue Jan 25, 2022 2:35 pm
by glrtheil
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.
Re: undefined reference to esp_blufi_gap_event_handler
Posted: Tue Jan 25, 2022 2:41 pm
by chegewara
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.
Re: undefined reference to esp_blufi_gap_event_handler
Posted: Sun Jan 30, 2022 3:56 am
by glrtheil
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.
Re: undefined reference to esp_blufi_gap_event_handler
Posted: Tue Feb 01, 2022 2:44 am
by matthew798
oh dear... Another 6 hours wasted...
Has someone submitted an issue for this?