Why doesn't main.h(pp) recognize #include

Sysprogs forums Forums VisualGDB Why doesn't main.h(pp) recognize #include

This topic contains 2 replies, has 2 voices, and was last updated by  GeneM 1 week, 4 days ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #32898

    GeneM
    Participant

    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

     

     

    #32899

    support
    Keymaster

    Hi,

    Sorry, it looks like something specific to your project or the gcc compiler rather than a VisualGDB-specific issue. If you would like to get generic programming help, please consider creating a question on StackOverflow instead.

    #32900

    GeneM
    Participant

    No problem, I thought it might be a VisualGDB setup problem.

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.