Help with my arduino library: no such file

Hi @rootspapapa. First of all I think it will be important for you to provide more information:

Please provide a link to where you found the code that includes the #include directive for boards.h.

Please tell us what made you think you needed to install this "mikrosdk_v2-master" library. If you are following some instructions, please provide a link to them.

I'm not implying that you are necessarily in error in these things. We simply need more information to understand the situation.

I will share some information about how #include directives are handled in Arduino IDE. Even though it is not necessarily relevant to the problem you are experiencing, it is something that is generally useful to understand and perhaps interesting as well.

When you compile a sketch, Arduino IDE does a process referred to as "library discovery", where the installed libraries are searched for any header files in the #include directives of the sketch code which were not found by the compiler in its include search paths. Once discovered, the library's path is added to the compiler's include search paths.

Only the files in the root of the library's source folder searched during library discovery.

Once the library's path has been added to the compiler's include search path, it is then possible to include additional header files from subfolders by using the file's path relative to the root of the source folder in the #include directive.

For example, let's say you have installed a library with this structure:

FooLib/
├── Foo.h
└── bar/
    └── Bar.h

Compiling this sketch:

#include <Bar.h>
void setup() {}
void loop() {}

Will fail with the error;

Bar.h: No such file or directory

A similar error will occur when compiling the sketch with the correct relative path in the #include directive:

#include <bar/Bar.h>
void setup() {}
void loop() {}
bar/Bar.h: No such file or directory

But if you cause the library to be discovered by adding an #include directive for the Foo.h file in the root of the library's source folder (which is the root of the library in this example), then the bar/Bar.h header can also be #included:

#include <Foo.h>
#include <bar/Bar.h>
void setup() {}
void loop() {}

Note that the #include directive for the file in the root of the source folder must come first.

Generally it is not necessary to use #include directives for header files in subfolders of libraries in your sketch because the library author typically puts the header files that serve as the public interface in the root of the source folder, reserving subfolders for files used internally by the library's own code.

From the path shown in the File Explorer screenshot you shared, it is clear the file board.h is not in the root of the source folder:

image

so a "board.h: No such file or directory" error message is normal and expected for an #include directive like:

#include <board.h>