Still scraping rust off of C++ and learning CLion, Raspberry Pi and Cmake. I am following https://blog.monotok.org/compile-locally-run-raspberry-pi-via-clion/ to cross-compile on my Ubuntu platform.
I have code that compiles fine locally, but when I cross-compile for raspberry pi, I get the following:
====================[ Build | rookery_exe | Raspberry Pi Release ]==============
/snap/bin/cmake --build /tmp/tmp.UNnm1OGKQ2/cmake-build-raspberry-pi-release --target rookery_exe -- -j 12
[ 10%] Building CXX object src/core/CMakeFiles/rookery_core.dir/CodeSource.cpp.o
[ 20%] Building CXX object src/core/CMakeFiles/rookery_core.dir/ArduinoSourceProperties.cpp.o
[ 30%] Building CXX object src/core/CMakeFiles/rookery_core.dir/Arduino.cpp.o
[ 50%] Building CXX object src/core/CMakeFiles/rookery_core.dir/WorkFile.cpp.o
[ 50%] Building CXX object src/core/CMakeFiles/rookery_core.dir/PropertiesFile.cpp.o
/tmp/tmp.UNnm1OGKQ2/src/core/WorkFile.cpp:1:22: fatal error: filesystem: No such file or directory
#include <filesystem>
^
compilation terminated.
In file included from /tmp/tmp.UNnm1OGKQ2/src/core/CodeSource.cpp:2:0:
/tmp/tmp.UNnm1OGKQ2/src/core/Arduino.h:5:22: fatal error: filesystem: No such file or directory
#include <filesystem>
^
compilation terminated.
gmake[3]: *** [src/core/CMakeFiles/rookery_core.dir/build.make:111: src/core/CMakeFiles/rookery_core.dir/CodeSource.cpp.o] Error 1
gmake[3]: *** Waiting for unfinished jobs....
gmake[3]: *** [src/core/CMakeFiles/rookery_core.dir/build.make:150: src/core/CMakeFiles/rookery_core.dir/WorkFile.cpp.o] Error 1
/tmp/tmp.UNnm1OGKQ2/src/core/ArduinoSourceProperties.cpp:1:22: fatal error: filesystem: No such file or directory
#include <filesystem>
^
compilation terminated.
gmake[3]: *** [src/core/CMakeFiles/rookery_core.dir/build.make:85: src/core/CMakeFiles/rookery_core.dir/ArduinoSourceProperties.cpp.o] Error 1
/tmp/tmp.UNnm1OGKQ2/src/core/PropertiesFile.cpp:3:22: fatal error: filesystem: No such file or directory
#include <filesystem>
^
compilation terminated.
gmake[3]: *** [src/core/CMakeFiles/rookery_core.dir/build.make:124: src/core/CMakeFiles/rookery_core.dir/PropertiesFile.cpp.o] Error 1
In file included from /tmp/tmp.UNnm1OGKQ2/src/core/Arduino.cpp:7:0:
/tmp/tmp.UNnm1OGKQ2/src/core/Arduino.h:5:22: fatal error: filesystem: No such file or directory
#include <filesystem>
^
compilation terminated.
gmake[3]: *** [src/core/CMakeFiles/rookery_core.dir/build.make:72: src/core/CMakeFiles/rookery_core.dir/Arduino.cpp.o] Error 1
gmake[2]: *** [CMakeFiles/Makefile2:203: src/core/CMakeFiles/rookery_core.dir/all] Error 2
gmake[1]: *** [CMakeFiles/Makefile2:236: src/exe/CMakeFiles/rookery_exe.dir/rule] Error 2
gmake: *** [Makefile:182: rookery_exe] Error 2
Maybe the cross compiler uses an older version of C++ that doesn't have file system? Is there a way to fix that? Maybe a compile flag?