I’m starting to use the embedded template library ( https://www.etlcpp.com/ ) as an alternative to the C++ STL because it doesn’t rely on dynamic memory allocations. I can use the etl string library in my class header files with a #include “C:\Users\gene\Documents\CPF\ElecEngr\cpfSTM32H7A3_SOM\Code\CPF_H7A3\CPF\ETL\include\etl\string.h”. But when I try to use the same #include in my main.hpp header file, I get these 3 errors repeated a bunch of times.
Error expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘<‘ token CPF C:\Users\gene\Documents\CPF\ElecEngr\cpfSTM32H7A3_SOM\Code\CPF_H7A3\CPF\ETL\include\etl\static_assert.h 37
Error expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘<‘ token CPF C:\Users\gene\Documents\CPF\ElecEngr\cpfSTM32H7A3_SOM\Code\CPF_H7A3\CPF\ETL\include\etl\static_assert.h 40
Error unknown type name ‘namespace’ CPF C:\Users\gene\Documents\CPF\ElecEngr\cpfSTM32H7A3_SOM\Code\CPF_H7A3\CPF\ETL\include\etl\type_traits.h 72
Based on the last error “unknown type name ‘namespace’, I get the impression the compiler doesn’t think my main.hpp file is a c++ file but I don’t know how to fix that. that’s just a guess on my part. Any suggestions will be greatly appreciated.
Thanks