Skip to content

2.1.0 not compiling on nRF devices #802

@mr258876

Description

@mr258876

Hello, I'm using a nRF51802 with n-able-Arduino core, and things just got wrong after installed 2.1.0 #800. I've read the migration guide and I think it's probably not related to the new functions.

Here's the compiling log:

  • When NimBLE Role option set to Peripheral:
d:\ProgrammingStuff\Arduino\libraries\NimBLE-Arduino\src\NimBLEServer.cpp: In destructor 'NimBLEServer::~NimBLEServer()':
d:\ProgrammingStuff\Arduino\libraries\NimBLE-Arduino\src\NimBLEServer.cpp:73:9: error: 'm_pClient' was not declared in this scope; did you mean 'BLEClient'?
   73 |     if (m_pClient != nullptr) {
      |         ^~~~~~~~~
      |         BLEClient
d:\ProgrammingStuff\Arduino\libraries\NimBLE-Arduino\src\NimBLEServer.cpp:74:16: error: type '<type error>' argument given to 'delete', expected pointer
   74 |         delete m_pClient;
      |                ^~~~~~~~~
d:\ProgrammingStuff\Arduino\libraries\NimBLE-Arduino\src\NimBLEServer.cpp: In static member function 'static int NimBLEServer::handleGapEvent(ble_gap_event*, void*)':
d:\ProgrammingStuff\Arduino\libraries\NimBLE-Arduino\src\NimBLEServer.cpp:402:26: error: 'class NimBLEServer' has no member named 'm_pClient'
  402 |             if (pServer->m_pClient && pServer->m_pClient->m_connHandle == event->disconnect.conn.conn_handle) {
      |                          ^~~~~~~~~
d:\ProgrammingStuff\Arduino\libraries\NimBLE-Arduino\src\NimBLEServer.cpp:402:48: error: 'class NimBLEServer' has no member named 'm_pClient'
  402 |             if (pServer->m_pClient && pServer->m_pClient->m_connHandle == event->disconnect.conn.conn_handle) {
      |                                                ^~~~~~~~~
d:\ProgrammingStuff\Arduino\libraries\NimBLE-Arduino\src\NimBLEServer.cpp:404:26: error: 'class NimBLEServer' has no member named 'm_pClient'
  404 |                 pServer->m_pClient->m_connHandle = BLE_HS_CONN_HANDLE_NONE;
      |                          ^~~~~~~~~
  • When NimBLE Role option set to 'All`:
c:/users/mr258876/appdata/local/arduino15/packages/h2zero/tools/gcc-arm-none-eabi/9.3.1-1/bin/../lib/gcc/arm-none-eabi/9.3.1/../../../../arm-none-eabi/bin/ld.exe: C:\Users\Mr258876\AppData\Local\arduino\sketches\52D05B75139C3E829C87BFCC345E421C\libraries\NimBLE-Arduino\objs.a(NimBLEDevice.cpp.o): in function `NimBLEDevice::deinit(bool)':
d:\ProgrammingStuff\Arduino\libraries\NimBLE-Arduino\src/NimBLEDevice.cpp:916: undefined reference to `nimble_port_stop'
collect2.exe: error: ld returned 1 exit status

I have made a temporary fix for both problem #801.

Again, thanks for all your hardwork!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions