This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Pointer to class instance

NrfIdentifyCommand identifyCommand;
NrfIdentifyCommand *pIdentifyCommand = &identifyCommand;

int commandId = identifyCommand.GetCommandId(); // works
commandId = pIdentifyCommand->GetCommandId(); // FAILS (on Devboard going to Nirvana ...)

Why can't call method in 2nd case?

Parents
  • GNU Compiler Collection: en.wikipedia.org/.../GNU_Compiler_Collection

    GCC 1.0 was released in 1987.[1] It was extended to compile C++ in December of that year.

    When talking about GCC I am talking about "GNU Compiler Collection" ;-)

    Compiling NRF SDK stuff via C:/Program Files (x86)/GNU Tools ARM Embedded/4.9 2015q2/bin/arm-none-eabi-gcc

    ... and C++ via C:/Program Files (x86)/GNU Tools ARM Embedded/4.9 2015q2/bin/arm-none-eabi-g++

    Btw, why exist there no pre-compiled libraries as on other platforms. Compiling NRF SDK + our project takes about 40 seconds ... that's quite long compared to Atmel for example ...

Reply
  • GNU Compiler Collection: en.wikipedia.org/.../GNU_Compiler_Collection

    GCC 1.0 was released in 1987.[1] It was extended to compile C++ in December of that year.

    When talking about GCC I am talking about "GNU Compiler Collection" ;-)

    Compiling NRF SDK stuff via C:/Program Files (x86)/GNU Tools ARM Embedded/4.9 2015q2/bin/arm-none-eabi-gcc

    ... and C++ via C:/Program Files (x86)/GNU Tools ARM Embedded/4.9 2015q2/bin/arm-none-eabi-g++

    Btw, why exist there no pre-compiled libraries as on other platforms. Compiling NRF SDK + our project takes about 40 seconds ... that's quite long compared to Atmel for example ...

Children
No Data
Related