You are viewing an older revision! See the latest version

Compiler Error 20

The compiler doesn't recognize the name of a variable or class you are trying to reference.

Check that you are compiling for the correct target, in the top right of the mbed Compiler there is a drop down that allows you to select from your microcontrollers.

Check that the variable or class has been previously defined. If you're sure you've already declared this class of variable, make sure that it is spelled correctly.

also check you fully qualified you member function names in the cpp files. i.e.

// my header
class foo {
  int val;
  int get();
};

// my cpp file that is in error
int get()  
{
  return val;
}

// my cpp file that is correct
int foo::get()  
{
  return val;
}

remember that with namespaces there may be a lot to declare (or may require some usings)

Identifier p10 is undefined

This generally means that you are trying to compile code for the NXP LPC1768, or LPC11U24, board, that names pins with the name pattern p[5-36], but you have specified a different microcontroller in the top right corner of the Online IDE.

Identifier PTE25 is undefined

This generally means that you are trying to compile code for the Freescale FRDM-KL25Z board, that names pins with the name pattern PT[A-E][0-31], but you have specified a different microcontroller in the top right corner of the Online IDE.


All wikipages