I am nearly positive this used to compile (like a few weeks ago). This is the repository (careful it has an error in it) and I am trying to fix the mistake, retest and update the code library. However now my test won’t compile… It seems like the compiler thinks I am redeclaring a bunch of stuff. Maybe I am… I am new to c++ so thanks to any help.
Not sure, if this will solve anything, but when you do your #ifndef check to avoid double include, the #endif should wrap the whole contents of the header file and not only the #define and the #include.
just in case the proprocesser contributes to your problem
And another tip is to look at the next few messages in your error output, since this usually also tells you with the “redeclare” error the position of the first declaration as a note
Solution of your compile error:
I’ve just built your code and the only thing I did was that I replaced this
I think the preprocessor does not care for the comment characters and the #pragma is still used as if it was not commented.
You can try this be adding a syntax error which will make your build fail and then have a look at the warnings.
I would not use the <...> notation for the include.