6 years, 11 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: "https://developer.mbed.org/users/screamer/code/mbed/file/aff670d0d510/mbed.h"

.

posted by Huzaifa Asif 11 May 2017

1 Answer

6 years, 11 months ago.

This is the correct one: https://developer.mbed.org/users/mbed_official/code/mbed/

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 - 11 May 2017