You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I tried to build my C++ application together with the corresponding ANTLR-runtime library under mingw 9.0 and encountered the following link errors in the Release configuration:
C:/Qt/Tools/mingw900_64/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe:
CMakeFiles/RailDSL.dir/antlr/MetaGrammar/MetaGrammarLexer.cpp.obj:MetaGrammarLexer.cpp:(.text+0x714):
undefined reference to `antlr4::atn::LexerATNSimulator::SimState::~SimState()'
C:/Qt/Tools/mingw900_64/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe:
CMakeFiles/RailDSL.dir/antlr/MetaGrammar/MetaGrammarLexer.cpp.obj:MetaGrammarLexer.cpp:
(.text$_ZN6antlr43atn17LexerATNSimulatorD0Ev[_ZN6antlr43atn17LexerATNSimulatorD0Ev]+0x1c):
undefined reference to `antlr4::atn::LexerATNSimulator::SimState::~SimState()'
C:/Qt/Tools/mingw900_64/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe:
CMakeFiles/RailDSL.dir/antlr/MetaGrammar/MetaGrammarParser.cpp.obj:MetaGrammarParser.cpp:(.text+0x3e56):
undefined reference to `antlr4::atn::LexerATNSimulator::SimState::~SimState()'
C:/Qt/Tools/mingw900_64/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe:
CMakeFiles/RailDSL.dir/antlr/MetaGrammar/MetaGrammarParser.cpp.obj:MetaGrammarParser.cpp:(.text+0x3ed6):
undefined reference to `antlr4::atn::LexerATNSimulator::SimState::~SimState()'
Referring to the LexerATNSimulator.h header file, I noticed that the ANTLR4CPP_PUBLIC macro was missing from the nested class.
I tried to build my C++ application together with the corresponding ANTLR-runtime library under mingw 9.0 and encountered the following link errors in the Release configuration:
Referring to the LexerATNSimulator.h header file, I noticed that the
ANTLR4CPP_PUBLIC
macro was missing from the nested class.antlr4/runtime/Cpp/runtime/src/atn/LexerATNSimulator.h
Lines 18 to 20 in ad29539
After adding this macro, link errors disappeared.
The text was updated successfully, but these errors were encountered: