The official Mbed 2 C/C++ SDK provides the software platform and libraries to build your applications.

Dependents:   hello SerialTestv11 SerialTestv12 Sierpinski ... more

Issue: namespace and size_t undefined

Hi

Try to upgrade an older project and het the following errors. Any suggestions what I'm missing here?

Error: Identifier "namespace" is undefined in "opt/RVCT_5.03/bin/../include/rw/_defs.h", Line: 781, Col: 2 Error: Expected a ";" in "opt/RVCT_5.03/bin/../include/rw/_defs.h", Line: 781, Col: 2 Error: Identifier "size_t" is undefined in "opt/RVCT_5.03/bin/../include/wchar.h", Line: 129, Col: 21 Error: Identifier "size_t" is undefined in "opt/RVCT_5.03/bin/../include/wchar.h", Line: 129, Col: 65 Error: Identifier "size_t" is undefined in "opt/RVCT_5.03/bin/../include/wchar.h", Line: 137, Col: 47 Error: Identifier "size_t" is undefined in "opt/RVCT_5.03/bin/../include/wchar.h", Line: 140, Col: 48 Error: Identifier "size_t" is undefined in "opt/RVCT_5.03/bin/../include/wchar.h", Line: 191, Col: 6 Error: Identifier "size_t" is undefined in "opt/RVCT_5.03/bin/../include/wchar.h", Line: 191, Col: 51 Error: Identifier "size_t" is undefined in "opt/RVCT_5.03/bin/../include/wchar.h", Line: 193, Col: 6 Error: Identifier "size_t" is undefined in "opt/RVCT_5.03/bin/../include/wchar.h", Line: 195, Col: 21 Error: Identifier "size_t" is undefined in "opt/RVCT_5.03/bin/../include/wchar.h", Line: 196, Col: 6 Error: Identifier "size_t" is undefined in "opt/RVCT_5.03/bin/../include/wchar.h", Line: 198, Col: 6 Error: Identifier "size_t" is undefined in "opt/RVCT_5.03/bin/../include/wchar.h", Line: 200, Col: 23 Error: Identifier "size_t" is undefined in "opt/RVCT_5.03/bin/../include/wchar.h", Line: 201, Col: 6 Error: Identifier "size_t" is undefined in "opt/RVCT_5.03/bin/../include/wchar.h", Line: 203, Col: 23 Error: Identifier "size_t" is undefined in "opt/RVCT_5.03/bin/../include/wchar.h", Line: 229, Col: 58 Error: Identifier "size_t" is undefined in "opt/RVCT_5.03/bin/../include/wchar.h", Line: 231, Col: 58 Error: Identifier "size_t" is undefined in "opt/RVCT_5.03/bin/../include/wchar.h", Line: 233, Col: 59 Error: Identifier "size_t" is undefined in "opt/RVCT_5.03/bin/../include/wchar.h", Line: 237, Col: 58 Error: Identifier "size_t" is undefined in "opt/RVCT_5.03/bin/../include/wchar.h", Line: 241, Col: 53 Error: Identifier "size_t" is undefined in "opt/RVCT_5.03/bin/../include/wchar.h", Line: 245, Col: 57 Error: Identifier "size_t" is undefined in "opt/RVCT_5.03/bin/../include/wchar.h", Line: 248, Col: 6 Error: Identifier "size_t" is undefined in "opt/RVCT_5.03/bin/../include/wchar.h", Line: 249, Col: 56 Error: Identifier "size_t" is undefined in "opt/RVCT_5.03/bin/../include/wchar.h", Line: 251, Col: 53 Error: Identifier "size_t" is undefined in "opt/RVCT_5.03/bin/../include/wchar.h", Line: 252, Col: 6 Error: Identifier "size_t" is undefined in "opt/RVCT_5.03/bin/../include/wchar.h", Line: 254, Col: 6 Error: Identifier "size_t" is undefined in "opt/RVCT_5.03/bin/../include/wchar.h", Line: 260, Col: 23 Error: Identifier "size_t" is undefined in "opt/RVCT_5.03/bin/../include/wchar.h", Line: 261, Col: 6 Error: Identifier "size_t" is undefined in "opt/RVCT_5.03/bin/../include/wchar.h", Line: 262, Col: 66 Error: Identifier "namespace" is undefined in "opt/RVCT_5.03/bin/../include/iosfwd", Line: 93, Col: 2

1 comment:

14 Nov 2016

Hi

I think I found the cause:

I had one file misnamed as *.c where it should be *.cpp.

Somehow during upgrade of the mBed lib from 63bcd7ba4912 to the latest one this became an issue with the puzzling/cryptic error messages as a result.

So the error/warning message might be improved (an extra compiler/ide warning would be welcome).