Hi!
I am building a custom module. The build is compiling fine for px4_sitl (running
make px4_sitl_default
).
When I build for cubepilot_cubeorangeplus flight board(running make cubepilot_cubeorangeplus_default
), I encounter the following error while I use #include <iostream>
in .h header files -
FAILED: src/a.cpp.obj
/opt/gcc-arm-none-eabi-9-2020-q2-update/bin/arm-none-eabi-g++ -DCONFIG_ARCH_BOARD_CUBEPILOT_CUBEORANGEPLUS -DMODULE_NAME="smf" -DPX4_MAIN=smf_app_main -D_SYS_CDEFS_H_ -D_SYS_REENT_H_ -D__CUSTOM_FILE_IO__ -D__PX4_NUTTX -D__STDC_FORMAT_MACROS -I/home/PX4-Autopilot/boards/cubepilot/cubeorangeplus/src -I/home/PX4-Autopilot/platforms/nuttx/src/px4/common/include -I/home/PX4-Autopilot/build/cubepilot_cubeorangeplus_default -I/home/PX4-Autopilot/build/cubepilot_cubeorangeplus_default/src/lib -I/home/PX4-Autopilot/platforms/nuttx/src/px4/stm/stm32h7/include -I/home/PX4-Autopilot/platforms/common -I/home/PX4-Autopilot/platforms/common/include -I/home/PX4-Autopilot/src -I/home/PX4-Autopilot/src/include -I/home/PX4-Autopilot/src/lib -I/home/PX4-Autopilot/src/lib/matrix -I/home/PX4-Autopilot/src/modules -I/home/PX4-Autopilot/platforms/nuttx/NuttX/nuttx/arch/arm/src/armv7-m -I/home/PX4-Autopilot/platforms/nuttx/NuttX/nuttx/arch/arm/src/chip -I/home/PX4-Autopilot/platforms/nuttx/NuttX/nuttx/arch/arm/src/common -I/home/PX4-Autopilot/platforms/nuttx/NuttX/apps/include -I/home/PX4-Autopilot/build/cubepilot_cubeorangeplus_default/external/Install/include -isystem /home/PX4-Autopilot/platforms/nuttx/NuttX/include/cxx -isystem /home/PX4-Autopilot/platforms/nuttx/NuttX/nuttx/include/cxx -isystem /home/PX4-Autopilot/platforms/nuttx/NuttX/nuttx/include -mcpu=cortex-m7 -mthumb -mfpu=fpv5-d16 -mfloat-abi=hard -Os -DNDEBUG -g -fdata-sections -ffunction-sections -fomit-frame-pointer -fmerge-all-constants -fno-signed-zeros -fno-trapping-math -freciprocal-math -fno-math-errno -fno-strict-aliasing -fvisibility=hidden -include visibility.h -Wall -Wextra -Werror -Warray-bounds -Wcast-align -Wdisabled-optimization -Wdouble-promotion -Wfatal-errors -Wfloat-equal -Wformat-security -Winit-self -Wlogical-op -Wpointer-arith -Wshadow -Wuninitialized -Wunknown-pragmas -Wunused-variable -Wno-missing-field-initializers -Wno-missing-include-dirs -Wno-unused-parameter -fdiagnostics-color=always -Wno-stringop-truncation -fno-builtin-printf -fno-strength-reduce -Wformat=1 -Wunused-but-set-variable -Wno-format-truncation -fcheck-new -Wreorder -Wno-overloaded-virtual -fno-rtti -fno-exceptions -fno-sized-deallocation -fno-threadsafe-statics -nostdinc++ -Wframe-larger-than=2048 -std=gnu++2a -MD -MT src/a.cpp.obj -MF src/a.cpp.obj.d -o src/a.cpp.obj -c /home/PX4-Autopilot/src/a.cpp
In file included from /home/PX4-Autopilot/src/a.cpp:37:
/home/PX4-Autopilot/src/a.h:38:10: fatal error: iostream: No such file or directory
38 | #include<iostream>
| ^~~~~~~~~~
compilation terminated.
Any help is much appreciated.