So, I’m trying to implement antlr into my program in VS 2022 with the Fortran90 grammars and I went ahead and built the cpp runtime provided in the antlr repo. I cloned the master branch and generated the dll, lib, and included the src files in my program and when I go to build it, and I get a shit ton of errors in the output. Eventually it gives the compiler error error C1003: error count exceeds 100; stopping compilation
. I’m using the ISO C++ 20 standard for my project.
As for what I was expecting, I was expecting it to build properly without errors and instead I got over 100. I built the demo included in the cpp runtime to see if it would build and it did and the .exe generated from it works fine as well. I then tried installing it via vcpkg and I got errors from there too.
This is just a snippet of the errors from this:
1>C:UsersPeytonDocumentsdevFortIDE2vedorantlr-incsrctreeParseTreeType.h(17,5): error C2143: syntax error: missing '}' before 'constant'
1>C:UsersPeytonDocumentsdevFortIDE2vedorantlr-incsrctreeParseTreeType.h(17,5): error C2059: syntax error: 'constant'
1>C:UsersPeytonDocumentsdevFortIDE2vedorantlr-incsrctreeParseTreeType.h(19,3): error C2143: syntax error: missing ';' before '}'
1>C:UsersPeytonDocumentsdevFortIDE2vedorantlr-incsrctreeParseTreeType.h(22,1): error C2059: syntax error: '}'
1>C:UsersPeytonDocumentsdevFortIDE2vedorantlr-incsrctreeParseTreeType.h(22,1): error C2143: syntax error: missing ';' before '}'
I also have a few different errors like this:
1>ParserATNSimulator.cpp
1>C:UsersPeytonDocumentsdevFortIDE2vedorantlr-incsrcatnParserATNSimulator.cpp(57,32): error C2491: 'antlr4::atn::ParserATNSimulator::TURN_OFF_LR_LOOP_ENTRY_BRANCH_OPT': definition of dllimport static data member not allowed
has anybody else run into this before or could this be a possible bug?