MBED Library Revision 41

25 Jul 2012

You lost me again. Code which compiled fine a few weeks ago now won't compile with Mbed lib. Rev 42. Went back to an old Rev 26 an it compiles OK.

The errors start with

"identifier "namespace" is undefined" in file "mbed.bldFileHandle.h", Line: 18, Col: 1

"expected a ";"" in file "mbed.bldFileHandle.h", Line: 18, Col: 15

Any advice, reading you can point me to.

Replies

25 Jul 2012

Hi Tim,

user Tim Exton-McGuinness wrote:

won't compile with Mbed lib. Rev 42. Went back to an old Rev 26 an it compiles OK.

The new mbed library trigger a new build system that compiles C files as C and C++ files as C++.

You can read more information about this change on this forum post: http://mbed.org/forum/news-announcements/topic/3686/

In short, you just need to rename the ".c" file that is failing to build to ".cpp".

HTH, Emilio

16 Mar 2013

What do you do if all your files are .cpp or .h and still get this error?

16 Mar 2013

If you can't figure out which part of the code is responsible you can comment out code until the error is gone. Or if you want help the best option is publishing your code, and making a new topic with the link to the published code, then we can import your entire code and see if we can find the error.

16 Mar 2013

Thanks. That helped. Deep down in a directory of a library I imported I missed a .c file.

Please log in to post a reply.