2 years, 4 months ago.

Errors upon importing mbed.h to my project - missing files and unknown type names

When I import 'mbed.h' file into my project, I end up with alot of errors including some missing files which I have to manually add such as "cmsis.h". Right now, it doesn't recognize the 'PinName' used in DigitalIn.h, Digitalout.h, DigitalInOut.h, and BusIn.h file.

This is where I imported the mbed.h file from: ""


posted by Huzaifa Asif 11 May 2017
Comment on this question

1 Answer

2 years, 4 months ago.

This is the correct one:

Thanks but it's still missing 'device.h' file

posted by Huzaifa Asif 11 May 2017

EDIT: I had to paste all the header files in the directory where my source code is located. Fixed! Thanks

posted by Huzaifa Asif 11 May 2017

Sorry when I extracted the files, it was okay but when I ran my code, I got similar errors i.e "Unknown type name 'PinName'"

posted by Huzaifa Asif 11 May 2017

Including mbed.h in your file should be sufficient. If you need to do more either something is going really wrong or you are doing something really wrong. If you just make a new basic helloworld program, does that function?

posted by Erik Olieman 11 May 2017

You need to log in to post a question