code.h has dependency on Eigen/Dense, and if I try to compile an application, let’s name it app.cpp, which uses code.h, I face no issues and I am able to compile it and run it. However, when I include code.h into main.ino, and execute ‘pio run’ in the terminal, I get several compiling errors coming from Eigen files (I am using Eigen 3.4.0).
I have tried what is suggested here but it did not work
Anyone who has any idea of what might be the issue of trying to include eigen dependent code into .ino files OR how to properly link them when using PlatformIO?
I have tried also what is suggested here, which is loosely what is done in ArduinoEigen, which I also tried to use. From the reply above, you can see the error comes from conflicting macros between esp32 lib and Eigen.