Arm Mbed OS support forum

Intellisense flagging cstdint types as unknown, acting like current namespace is mbed::

I’ve switched to using gcc, and mbed studio is flagging my types like uint8_t as unknown.
It also thinks that classes I declare are in the mbed:: namespace.

My header is something like:

#include <mbed.h>
#include <cstdint>

class MyClass {
uint8_t something;
uint16_t somethingElse;
PinName somePin;

This results in errors like this:

Unknown type name 'uint16_t'
Unknown type name 'PinName'; did you mean 'mbed::PinName'?

note: 'mbed::PinName' declared here

And when I include that header in another file I get errors like this:

Use of undeclared identifier 'MyClass'; did you mean 'mbed::MyClass'?

When I compile this using gcc I don’t see these errors.

If I add a using-declaration for mbed::PinName I don’t see the PinName message in the Problems view but gcc complains that it doesn’t know anything about mbed::PinName

I’m using version 1.2.1 of mbed studio.

usually, <> is for the system includes. Have you tried

#include "mbed.h"


Yes, no difference.