Here's how you can build a C++ project while using the BLE stack.
1) In main.cpp comment out aat.h and use extern C around all remaining *.h files
2) Create an aat.c file which includes stdint.h and aat.h (in that order) and add it to your project
3) Use the C/C++ compiler option: auto (extension-based)
Wrapping headers in extern C is sufficient because the AAT was removed after the legacy bootloader support ended.