HI all, On my S32K148EVB board I'm trying to compile the "C++ test program" using the gcc-arm-none-eabi-7-2017-q4-major toolchain. however I'm running C++ header issues. I've checked the "integrating with newlib" documentation (located at https://cwiki.apache.org/confluence/display/NUTTX/Integrating+with+Newlib) however I'm getting errors that are not mentioned there. What would be the required steps to make C++ work on NuttX with the gcc compiler and newlib library? Please find the compilation output below:
Regards, Peter van der Perk CXX: cxxtest_main.cxx cxxtest_main.cxx:63:4: warning: #warning Support for static initializers is NOT enabled [-Wcpp] # warning Support for static initializers is NOT enabled ^~~~~~~ In file included from /home/hovergames/gcc-arm-none-eabi-7-2017-q4-major/arm-none-eabi/include/c++/7.2.1/bits/char_traits.h:422:0, from /home/hovergames/gcc-arm-none-eabi-7-2017-q4-major/arm-none-eabi/include/c++/7.2.1/ios:40, from /home/hovergames/gcc-arm-none-eabi-7-2017-q4-major/arm-none-eabi/include/c++/7.2.1/istream:38, from /home/hovergames/gcc-arm-none-eabi-7-2017-q4-major/arm-none-eabi/include/c++/7.2.1/fstream:38, from cxxtest_main.cxx:43: /home/hovergames/nuttx/socketcan-nuttx/include/cxx/cstdint:75:11: error: 'uint_least32_t' is already declared in this scope using ::uint_least32_t; ^~~~~~~~~~~~~~ In file included from /home/hovergames/gcc-arm-none-eabi-7-2017-q4-major/arm-none-eabi/include/c++/7.2.1/bits/locale_facets.h:41:0, from /home/hovergames/gcc-arm-none-eabi-7-2017-q4-major/arm-none-eabi/include/c++/7.2.1/bits/basic_ios.h:37, from /home/hovergames/gcc-arm-none-eabi-7-2017-q4-major/arm-none-eabi/include/c++/7.2.1/ios:44, from /home/hovergames/gcc-arm-none-eabi-7-2017-q4-major/arm-none-eabi/include/c++/7.2.1/istream:38, from /home/hovergames/gcc-arm-none-eabi-7-2017-q4-major/arm-none-eabi/include/c++/7.2.1/fstream:38, from cxxtest_main.cxx:43: /home/hovergames/gcc-arm-none-eabi-7-2017-q4-major/arm-none-eabi/include/c++/7.2.1/arm-none-eabi/thumb/v7e-m/bits/ctype_base.h:44:35: error: '_U' was not declared in this scope static const mask upper = _U; ^~ /home/hovergames/gcc-arm-none-eabi-7-2017-q4-major/arm-none-eabi/include/c++/7.2.1/arm-none-eabi/thumb/v7e-m/bits/ctype_base.h:45:32: error: '_L' was not declared in this scope static const mask lower = _L; ^~ /home/hovergames/gcc-arm-none-eabi-7-2017-q4-major/arm-none-eabi/include/c++/7.2.1/arm-none-eabi/thumb/v7e-m/bits/ctype_base.h:46:32: error: '_U' was not declared in this scope static const mask alpha = _U | _L; ^~ /home/hovergames/gcc-arm-none-eabi-7-2017-q4-major/arm-none-eabi/include/c++/7.2.1/arm-none-eabi/thumb/v7e-m/bits/ctype_base.h:46:37: error: '_L' was not declared in this scope static const mask alpha = _U | _L; ^~ /home/hovergames/gcc-arm-none-eabi-7-2017-q4-major/arm-none-eabi/include/c++/7.2.1/arm-none-eabi/thumb/v7e-m/bits/ctype_base.h:47:32: error: '_N' was not declared in this scope static const mask digit = _N; ^~ /home/hovergames/gcc-arm-none-eabi-7-2017-q4-major/arm-none-eabi/include/c++/7.2.1/arm-none-eabi/thumb/v7e-m/bits/ctype_base.h:47:32: note: suggested alternative: '__N' static const mask digit = _N; ^~ __N /home/hovergames/gcc-arm-none-eabi-7-2017-q4-major/arm-none-eabi/include/c++/7.2.1/arm-none-eabi/thumb/v7e-m/bits/ctype_base.h:48:33: error: '_X' was not declared in this scope static const mask xdigit = _X | _N; ^~ /home/hovergames/gcc-arm-none-eabi-7-2017-q4-major/arm-none-eabi/include/c++/7.2.1/arm-none-eabi/thumb/v7e-m/bits/ctype_base.h:48:38: error: '_N' was not declared in this scope static const mask xdigit = _X | _N; ^~ /home/hovergames/gcc-arm-none-eabi-7-2017-q4-major/arm-none-eabi/include/c++/7.2.1/arm-none-eabi/thumb/v7e-m/bits/ctype_base.h:48:38: note: suggested alternative: '__N' static const mask xdigit = _X | _N; ^~ __N /home/hovergames/gcc-arm-none-eabi-7-2017-q4-major/arm-none-eabi/include/c++/7.2.1/arm-none-eabi/thumb/v7e-m/bits/ctype_base.h:49:32: error: '_S' was not declared in this scope static const mask space = _S; ^~ /home/hovergames/gcc-arm-none-eabi-7-2017-q4-major/arm-none-eabi/include/c++/7.2.1/arm-none-eabi/thumb/v7e-m/bits/ctype_base.h:50:32: error: '_P' was not declared in this scope static const mask print = _P | _U | _L | _N | _B; ^~ /home/hovergames/gcc-arm-none-eabi-7-2017-q4-major/arm-none-eabi/include/c++/7.2.1/arm-none-eabi/thumb/v7e-m/bits/ctype_base.h:50:32: note: suggested alternative: '_PCC' static const mask print = _P | _U | _L | _N | _B; ^~ _PCC /home/hovergames/gcc-arm-none-eabi-7-2017-q4-major/arm-none-eabi/include/c++/7.2.1/arm-none-eabi/thumb/v7e-m/bits/ctype_base.h:50:37: error: '_U' was not declared in this scope static const mask print = _P | _U | _L | _N | _B; ^~ /home/hovergames/gcc-arm-none-eabi-7-2017-q4-major/arm-none-eabi/include/c++/7.2.1/arm-none-eabi/thumb/v7e-m/bits/ctype_base.h:50:42: error: '_L' was not declared in this scope static const mask print = _P | _U | _L | _N | _B; ^~ /home/hovergames/gcc-arm-none-eabi-7-2017-q4-major/arm-none-eabi/include/c++/7.2.1/arm-none-eabi/thumb/v7e-m/bits/ctype_base.h:50:47: error: '_N' was not declared in this scope static const mask print = _P | _U | _L | _N | _B; ^~ /home/hovergames/gcc-arm-none-eabi-7-2017-q4-major/arm-none-eabi/include/c++/7.2.1/arm-none-eabi/thumb/v7e-m/bits/ctype_base.h:50:47: note: suggested alternative: '__N' static const mask print = _P | _U | _L | _N | _B; ^~ __N /home/hovergames/gcc-arm-none-eabi-7-2017-q4-major/arm-none-eabi/include/c++/7.2.1/arm-none-eabi/thumb/v7e-m/bits/ctype_base.h:50:52: error: '_B' was not declared in this scope static const mask print = _P | _U | _L | _N | _B; ^~ /home/hovergames/gcc-arm-none-eabi-7-2017-q4-major/arm-none-eabi/include/c++/7.2.1/arm-none-eabi/thumb/v7e-m/bits/ctype_base.h:51:32: error: '_P' was not declared in this scope static const mask graph = _P | _U | _L | _N; ^~ /home/hovergames/gcc-arm-none-eabi-7-2017-q4-major/arm-none-eabi/include/c++/7.2.1/arm-none-eabi/thumb/v7e-m/bits/ctype_base.h:51:32: note: suggested alternative: '_PCC' static const mask graph = _P | _U | _L | _N; ^~ _PCC /home/hovergames/gcc-arm-none-eabi-7-2017-q4-major/arm-none-eabi/include/c++/7.2.1/arm-none-eabi/thumb/v7e-m/bits/ctype_base.h:51:37: error: '_U' was not declared in this scope static const mask graph = _P | _U | _L | _N; ^~ /home/hovergames/gcc-arm-none-eabi-7-2017-q4-major/arm-none-eabi/include/c++/7.2.1/arm-none-eabi/thumb/v7e-m/bits/ctype_base.h:51:42: error: '_L' was not declared in this scope static const mask graph = _P | _U | _L | _N; ^~ /home/hovergames/gcc-arm-none-eabi-7-2017-q4-major/arm-none-eabi/include/c++/7.2.1/arm-none-eabi/thumb/v7e-m/bits/ctype_base.h:51:47: error: '_N' was not declared in this scope static const mask graph = _P | _U | _L | _N; ^~ /home/hovergames/gcc-arm-none-eabi-7-2017-q4-major/arm-none-eabi/include/c++/7.2.1/arm-none-eabi/thumb/v7e-m/bits/ctype_base.h:51:47: note: suggested alternative: '__N' static const mask graph = _P | _U | _L | _N; ^~ __N /home/hovergames/gcc-arm-none-eabi-7-2017-q4-major/arm-none-eabi/include/c++/7.2.1/arm-none-eabi/thumb/v7e-m/bits/ctype_base.h:52:32: error: '_C' was not declared in this scope static const mask cntrl = _C; ^~ /home/hovergames/gcc-arm-none-eabi-7-2017-q4-major/arm-none-eabi/include/c++/7.2.1/arm-none-eabi/thumb/v7e-m/bits/ctype_base.h:52:32: note: suggested alternative: '_PCC' static const mask cntrl = _C; ^~ _PCC /home/hovergames/gcc-arm-none-eabi-7-2017-q4-major/arm-none-eabi/include/c++/7.2.1/arm-none-eabi/thumb/v7e-m/bits/ctype_base.h:53:32: error: '_P' was not declared in this scope static const mask punct = _P; ^~ /home/hovergames/gcc-arm-none-eabi-7-2017-q4-major/arm-none-eabi/include/c++/7.2.1/arm-none-eabi/thumb/v7e-m/bits/ctype_base.h:53:32: note: suggested alternative: '_PCC' static const mask punct = _P; ^~ _PCC /home/hovergames/gcc-arm-none-eabi-7-2017-q4-major/arm-none-eabi/include/c++/7.2.1/arm-none-eabi/thumb/v7e-m/bits/ctype_base.h:54:32: error: '_U' was not declared in this scope static const mask alnum = _U | _L | _N; ^~ /home/hovergames/gcc-arm-none-eabi-7-2017-q4-major/arm-none-eabi/include/c++/7.2.1/arm-none-eabi/thumb/v7e-m/bits/ctype_base.h:54:37: error: '_L' was not declared in this scope static const mask alnum = _U | _L | _N; ^~ /home/hovergames/gcc-arm-none-eabi-7-2017-q4-major/arm-none-eabi/include/c++/7.2.1/arm-none-eabi/thumb/v7e-m/bits/ctype_base.h:54:42: error: '_N' was not declared in this scope static const mask alnum = _U | _L | _N; ^~ /home/hovergames/gcc-arm-none-eabi-7-2017-q4-major/arm-none-eabi/include/c++/7.2.1/arm-none-eabi/thumb/v7e-m/bits/ctype_base.h:54:42: note: suggested alternative: '__N' static const mask alnum = _U | _L | _N; ^~ __N cxxtest_main.cxx: In function 'void test_rtti()': cxxtest_main.cxx:207:39: error: 'dynamic_cast' not permitted with -fno-rtti Extend *t = dynamic_cast<Extend *>(a); ^ cxxtest_main.cxx:210:31: error: 'dynamic_cast' not permitted with -fno-rtti t = dynamic_cast<Extend *>(b); ^ cxxtest_main.cxx:214:10: warning: deleting object of polymorphic class type 'Base' which has non-virtual destructor might cause undefined behavior [-Wdelete-non-virtual-dtor] delete a; ^ cxxtest_main.cxx:215:10: warning: deleting object of polymorphic class type 'Base' which has non-virtual destructor might cause undefined behavior [-Wdelete-non-virtual-dtor] delete b; ^ /home/hovergames/nuttx/apps/Application.mk:172: recipe for target 'cxxtest_main.home.hovergames.nuttx.apps.testing.cxxtest.o' failed make[2]: *** [cxxtest_main.home.hovergames.nuttx.apps.testing.cxxtest.o] Error 1 make[2]: Leaving directory '/home/hovergames/nuttx/apps/testing/cxxtest' Makefile:75: recipe for target '/home/hovergames/nuttx/apps/testing/cxxtest_all' failed make[1]: *** [/home/hovergames/nuttx/apps/testing/cxxtest_all] Error 2 make[1]: Leaving directory '/home/hovergames/nuttx/apps' tools/LibTargets.mk:198: recipe for target '../apps/libapps.a' failed make: *** [../apps/libapps.a] Error 2