Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
10 years, 10 months ago.
Unable to compile #include "mbed.h"
I'm trying to create a new file for an LPC1768 program but when compiled results in many errors, e.g.,
Error: Identifier "namespace" is undefined in "extras/mbed_dc225afb6914/DigitalIn.h", Line: 23, Col: 2 Error: Expected a ";" in "extras/mbed_dc225afb6914/DigitalIn.h", Line: 23, Col: 16 Warning: Parsing restarts here after previous syntax error in "extras/mbed_dc225afb6914/DigitalIn.h", Line: 85, Col: 16
etc.
I've commented everything in the file except the #include "mbed.h" statement and the errors are still generated. The program would compile before I added the new file.
What might be wrong here?
2 Answers
10 years, 10 months ago.
I found the problem, the filename extension was "c" instead of "cpp".
I have a similar error and no idea to solve it. Filename is cpp.
Error: Identifier "namespace" is undefined in "extras/mbed_8a40adfe8776/DigitalIn.h", Line: 23, Col: 2
Thanks. I have the same problem solved.
posted by Mohd Salleh 30 Aug 2018