But when I try to build the project, I’m getting a “no such file or directory error” for the ‘functions.hpp’ file, which is linked from the ‘evaluator.hpp’ file:
in file included from src/main.cpp:129:
lib/s2e2cpp/include/s2e2/evaluator.hpp:3:10: fatal error: s2e2/function.hpp: No such file or directory
3 | #include <s2e2/function.hpp>
| ^~~~~~~~~~~~~~~~~~~
The lib_ldf_mode in my platformio.ini is set to deep+
I also tried
adding the library’s relevant paths via -I switches in the build_flags
adding the library’s relevant paths to the ‘lib_extra_dirs’ flag
however I’m not getting passed this error.
It looks to me like this is related to the use of subfolders in the library, but I’m not sure how to force traversing through these subfolders.
Finally I tried to add a ‘library.json’ to the root folder of this library. After that, I’m getting the same error, but this time for the file in the include directive, namely “evaluator.hpp”
I might have made a mistake in the composition of this library.json, altough, the pio pkg pack command seems to accept the library.json file
However, it was a typo I made during the writing of this post.; I am actually using the correct include #include <s2e2/evaluator.hpp>. I’ve corrected it it in my original post.
Thanks again for your assistance sivar2311.
I tried with your example library.json file but the error remains:
src/main.cpp:129:12: fatal error: **s2e2/evaluator.hpp**: No such file or directory
129 | **#include <s2e2/evaluator.hpp>**
| ^~~~~~~~~~~~~~~~~~~~
compilation terminated.
*** [.pio/build/RPI4/src/main.o] Error 1
As for you sidenote: Thank for the tip. I am aware of the benefits of cloning via github, however in this case that is not an option as I’m restricted by policies (backed by a very efficient firewall )
downloaded the s2e2 sourcecode as zip and put the content to ./lib/s2e2cpp
added a minimum library.json to ./lib/s2e2cpp
wrote a simple main.cpp for test compile
Note: I don’t have RPI4 so i used the native platform for test-compile.
As for you sidenote: Thank for the tip. I am aware of the benefits of cloning via github, however in this case that is not an option as I’m restricted by policies (backed by a very efficient firewall )
That’s what I thought. I just wanted to point out what happens automatically in the background when using lib_deps in conjunction with a GitHub repository.
Very kind of you sivar2311. That was the next thing on my list, but you prepared it very nicely for me I only changed the platform to linux_arm
And more or less as expected, it compiles perfectly fine on the same development environment…
I’m running out of ideas where to look. I reviewed the verbose log output, but didn’t notice anything out of the ordinary. Maybe worth mentioning is that the intellisense works fine, I can ctrl-click to jump to the class definition. Any suggestions welcome!
No, I expressed wrong. I meant your sample compiles without issues. The original project still gives the same ‘no such file’ error.
I literally moved the s2e2cpp folder from your testproject to my own project’s lib folder, and even then my own project keeps produces the ‘no such file’ error.
Sharing the project is not an option, unfortunately.
I can provide whatever information you need.
Right now I’m testing by moving parts of my project into your demo project and hopefully at some point I’ll run into the same error. A cumbersome work because there are dozens of libraries (static and dynamically linked) but I see no other option. I’ll keep you informed! Meanwhile, thanks for your efforts!!