5 years ago.

where are header-files ?

I'm using the online-compiler (maybe that's the reason for my question) I'm not new to programming. In fact I'm writing code for several 10 years. Usually I'm using Arduino or Atollic.

My problem now: If I'm compiling the blinky-example, it works. But... I would like to know which pins (also other I2C-examples) I'm referring to. Normally I would have a look into the referenced *.h-files. But where are they ? Also the standard.

-> I was exporting the project to Eclipse and had the files as part of the export. But that cannot be the way: Exporting the project to another IDE just to get access to the header-files.

That's my question now: If I'm using the online-IDE, where do I find the header-files ?

1 Answer

5 years ago.

The short answer is you don't easily. If you look at the blinky example it's using the mbed (or mbed-os) library which is pulled in using #include "mbed'h" but the contents of that library are hidden.

If on the other hand you delete the compiled library from the project and import the source code for the library (the mbed-dev project for mbed2, it's a little more involved for mbed-os) then in addition to longer compile times you also have the full source including all the headers visible.

Or if you just want to look at the headers rather than change them you can browse the source code (again the mbed-dev project for mbed 2 or https://github.com/ARMmbed/mbed-os for mbed-os)

Because the libraries cover multiple platforms it can take a while to get used to navigating them and finding the bits you need.