8 years, 12 months ago.

compile problem

when I try to compile my project, the IDE shows:

  • 1.Error: Identifier "namespace" is undefined in "extras/mbed_6213f644d804/DigitalIn.h", Line: 23, Col: 2
  • 2.Error: Expected a ";" in "extras/mbed_6213f644d804/DigitalIn.h", Line: 23, Col: 17
  • 3.Error: Expected a declaration in "extras/mbed_6213f644d804/DigitalIn.h", Line: 93, Col: 2
  • 4.Error: Expected a declaration in "extras/mbed_6213f644d804/DigitalOut.h", Line: 102, Col: 2
  • 5.Error: Expected a declaration in "extras/mbed_6213f644d804/DigitalOut.h", Line: 104, Col: 2 ......
  • Error: Expected a ";" in "extras/mbed_6213f644d804/BusIn.h", Line: 46, Col: 14
  • Error: Expected a declaration in "extras/mbed_6213f644d804/DigitalInOut.h", Line: 110, Col: 2

but all above errors are libraries' problem, i haven't done anything to the library , the compiler has shown none error about myself codes, anyone else has encountered this problem? who knows the reason? I need you help urgently! Thanks!

/media/uploads/weiarm2015/capture.png

Did you try to update your mbed library?

posted by Thiago . 27 Nov 2015

1 Answer

7 years, 9 months ago.

This is frequently caused by *.c filename extension instead of *.cpp.