Closed zosrothko closed 2 years ago
Correct, it will be fixed by https://github.com/antlr/antlr4/pull/3725
Also, please actual branch dev
instead of stable master
@KvanTTT the branch dev has the same problem: L'opération de regénération a démarré... 1>------ Début de la regénération globale : Projet : antlr4cpp-vs2019, Configuration : Debug DLL x64 ------ 1>ANTLRErrorListener.cpp 1>ANTLRErrorStrategy.cpp 1>ANTLRFileStream.cpp 1>ANTLRInputStream.cpp 1>AbstractPredicateTransition.cpp 1>ActionTransition.cpp 1>AmbiguityInfo.cpp 1>ArrayPredictionContext.cpp 1>c1xx : fatal error C1083: Impossible d'ouvrir le fichier source : 'src\atn\AbstractPredicateTransition.cpp' : No such file or directory
Yes, but PR hasn't been merged yet.
Ok...objective is to update this pull request: Nuget packages for ANTLR 4
BTW, I removed support of VS < 2019 and added support of VS 2022.
I go not understand how this project is running. Even the tag 4.10.1 does not compile
D:\projects\antlr\antlr4-4.10.1\runtime\Cpp\runtime\nuget>git log
commit 44d87bc1d130c88aa452894aa5f7e2f710f68253 (HEAD, tag: v4.10.1, tag: 4.10.1)
Author: Terence Parr <parrt@antlr.org>
Date: Fri Apr 15 14:44:52 2022 -0700
[maven-release-plugin] prepare release 4.10.1
commit 03c47f766ef0eeb292e4a1df60dae4ffe63400a3
Author: Terence Parr <parrt@antlr.org>
Date: Fri Apr 15 11:25:48 2022 -0700
Prep 4.10.1 (#3660)
* [C++] Remove reference to antlrcpp:s2ws (#3656)
Signed-off-by: Justin King <jcking@google.com>
* Fix build to set the release to Java 8 (#3648)
Signed-off-by: Tyler Van Gorder <tkvangorder@users.noreply.github.com>
Co-authored-by: Tyler Van Gorder <tkvangorder@users.noreply.github.com>
* prep for 4.10.1
Signed-off-by: Terence Parr <parrt@antlr.org>
Cpp runtime compilation with VS20129 is also failing!!! When this PR #3725 will be applied?
D:\projects\antlr\antlr4-4.10.1\runtime\Cpp\runtime\nuget>echo off
============= C:\Program Files (x86)\Microsoft Visual Studio\2019\Community =============
**********************************************************************
** Visual Studio 2019 Developer Command Prompt v16.9.1
** Copyright (c) 2021 Microsoft Corporation
**********************************************************************
[vcvarsall.bat] Environment initialized for: 'x86'
Microsoft (R) Build Engine version 16.9.0+57a23d249 pour .NET Framework
Copyright (C) Microsoft Corporation. Tous droits réservés.
La génération a démarré 31/05/2022 07:00:08.
Projet "D:\projects\antlr\antlr4-4.10.1\runtime\Cpp\runtime\antlr4cpp-vs2019.vcxproj" sur le noud 1 (rebuild cible(s)).
_PrepareForClean:
Suppression du fichier "D:\projects\antlr\antlr4-4.10.1\runtime\Cpp\runtime\obj\x86\Debug DLL\antlr4cpp-vs2019\antlr4cpp-vs2019.tlog\antlr4cpp-vs2019.lastbuildstate".
InitializeBuildStatus:
Mise à jour de l'horodatage "D:\projects\antlr\antlr4-4.10.1\runtime\Cpp\runtime\obj\x86\Debug DLL\antlr4cpp-vs2019\antlr4cpp-vs2019.tlog\unsuccessfulbuild".
ClCompile:
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.28.29910\bin\HostX86\x86\CL.exe /c /Isrc /ZI /JMC /nologo /W4 /WX- /diagnostics:column /MP /Od /Oy- /D ANTLR4CPP
_EXPORTS /D _WINDLL /D _UNICODE /D UNICODE /Gm- /EHsc /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /std:c++17 /Fo"D:\projects\antlr\antlr4-4.10.1\runtime\Cpp\runtime\obj\x86
\Debug DLL\antlr4cpp-vs2019\\" /Fd"D:\projects\antlr\antlr4-4.10.1\runtime\Cpp\runtime\obj\x86\Debug DLL\antlr4cpp-vs2019\vc142.pdb" /Gd /TP /wd4251 /analyze- /FC /errorReport:queue /Zc:__cpl
usplus src\ANTLRErrorListener.cpp src\ANTLRErrorStrategy.cpp src\ANTLRFileStream.cpp src\ANTLRInputStream.cpp src\atn\AbstractPredicateTransition.cpp src\atn\ActionTransition.cpp src\atn\Ambi
guityInfo.cpp src\atn\ArrayPredictionContext.cpp src\atn\ATN.cpp src\atn\ATNConfig.cpp src\atn\ATNConfigSet.cpp src\atn\ATNDeserializationOptions.cpp src\atn\ATNDeserializer.cpp src\atn\ATNSe
rializer.cpp src\atn\ATNSimulator.cpp src\atn\ATNState.cpp src\atn\AtomTransition.cpp src\atn\BasicBlockStartState.cpp src\atn\BasicState.cpp src\atn\BlockEndState.cpp src\atn\BlockStartState
.cpp src\atn\ContextSensitivityInfo.cpp src\atn\DecisionEventInfo.cpp src\atn\DecisionInfo.cpp src\atn\DecisionState.cpp src\atn\EmptyPredictionContext.cpp src\atn\EpsilonTransition.cpp src\a
tn\ErrorInfo.cpp src\atn\LexerAction.cpp src\atn\LexerActionExecutor.cpp src\atn\LexerATNConfig.cpp src\atn\LexerATNSimulator.cpp src\atn\LexerChannelAction.cpp src\atn\LexerCustomAction.cpp
src\atn\LexerIndexedCustomAction.cpp src\atn\LexerModeAction.cpp src\atn\LexerMoreAction.cpp src\atn\LexerPopModeAction.cpp src\atn\LexerPushModeAction.cpp src\atn\LexerSkipAction.cpp src\atn
\LexerTypeAction.cpp src\atn\LL1Analyzer.cpp src\atn\LookaheadEventInfo.cpp src\atn\LoopEndState.cpp src\atn\NotSetTransition.cpp src\atn\OrderedATNConfigSet.cpp src\atn\ParseInfo.cpp src\atn
\ParserATNSimulator.cpp src\atn\PlusBlockStartState.cpp src\atn\PlusLoopbackState.cpp src\atn\PrecedencePredicateTransition.cpp src\atn\PredicateEvalInfo.cpp src\atn\PredicateTransition.cpp s
rc\atn\PredictionContext.cpp src\atn\PredictionMode.cpp src\atn\ProfilingATNSimulator.cpp src\atn\RangeTransition.cpp src\atn\RuleStartState.cpp src\atn\RuleStopState.cpp src\atn\RuleTransiti
on.cpp src\atn\SemanticContext.cpp src\atn\SetTransition.cpp src\atn\SingletonPredictionContext.cpp src\atn\StarBlockStartState.cpp src\atn\StarLoopbackState.cpp src\atn\StarLoopEntryState.cp
p src\atn\TokensStartState.cpp src\atn\Transition.cpp src\atn\WildcardTransition.cpp src\BailErrorStrategy.cpp src\BaseErrorListener.cpp src\BufferedTokenStream.cpp src\CharStream.cpp src\Com
monToken.cpp src\CommonTokenFactory.cpp src\CommonTokenStream.cpp src\ConsoleErrorListener.cpp src\DefaultErrorStrategy.cpp src\dfa\DFA.cpp src\dfa\DFASerializer.cpp src\dfa\DFAState.cpp src\
dfa\LexerDFASerializer.cpp src\DiagnosticErrorListener.cpp src\Exceptions.cpp src\FailedPredicateException.cpp src\InputMismatchException.cpp src\InterpreterRuleContext.cpp src\IntStream.cpp
src\Lexer.cpp src\LexerInterpreter.cpp src\LexerNoViableAltException.cpp src\ListTokenSource.cpp src\misc\InterpreterDataReader.cpp src\misc\Interval.cpp src\misc\IntervalSet.cpp src\misc\Mur
murHash.cpp src\misc\Predicate.cpp src\NoViableAltException.cpp src\Parser.cpp src\ParserInterpreter.cpp src\ParserRuleContext.cpp src\ProxyErrorListener.cpp src\RecognitionException.cpp src\
Recognizer.cpp src\RuleContext.cpp src\RuleContextWithAltNum.cpp src\RuntimeMetaData.cpp src\support\Any.cpp src\support\Arrays.cpp src\support\CPPUtils.cpp src\support\Guid.cpp src\support\S
tringUtils.cpp src\Token.cpp src\TokenSource.cpp src\TokenStream.cpp src\TokenStreamRewriter.cpp src\tree\ErrorNode.cpp src\tree\ErrorNodeImpl.cpp src\tree\IterativeParseTreeWalker.cpp src\tr
ee\ParseTree.cpp src\tree\ParseTreeListener.cpp src\tree\ParseTreeVisitor.cpp src\tree\ParseTreeWalker.cpp src\tree\pattern\Chunk.cpp src\tree\pattern\ParseTreeMatch.cpp src\tree\pattern\Pars
eTreePattern.cpp src\tree\pattern\ParseTreePatternMatcher.cpp src\tree\pattern\RuleTagToken.cpp src\tree\pattern\TagChunk.cpp src\tree\pattern\TextChunk.cpp src\tree\pattern\TokenTagToken.cpp
src\tree\TerminalNode.cpp src\tree\TerminalNodeImpl.cpp src\tree\Trees.cpp src\tree\xpath\XPath.cpp src\tree\xpath\XPathElement.cpp src\tree\xpath\XPathLexer.cpp src\tree\xpath\XPathLexerErr
orListener.cpp src\tree\xpath\XPathRuleAnywhereElement.cpp src\tree\xpath\XPathRuleElement.cpp src\tree\xpath\XPathTokenAnywhereElement.cpp src\tree\xpath\XPathTokenElement.cpp src\tree\xpath
\XPathWildcardAnywhereElement.cpp src\tree\xpath\XPathWildcardElement.cpp src\UnbufferedCharStream.cpp src\UnbufferedTokenStream.cpp src\Vocabulary.cpp src\WritableToken.cpp
ANTLRErrorListener.cpp
ANTLRErrorStrategy.cpp
ANTLRFileStream.cpp
ANTLRInputStream.cpp
AbstractPredicateTransition.cpp
ActionTransition.cpp
AmbiguityInfo.cpp
ArrayPredictionContext.cpp
c1xx : fatal error C1083: Impossible d'ouvrir le fichier source : 'src\atn\AbstractPredicateTransition.cpp' : No such file or directory [D:\projects\antlr\antlr4-4.10.1\runtime\Cpp\runtime\antl
r4cpp-vs2019.vcxproj]
ATN.cpp
D:\projects\antlr\antlr4-4.10.1\runtime\Cpp\runtime\src\Exceptions.h(13,67): warning C4275: interface non dll class 'std::exception' utilisée comme base d'une interface dll class 'antlr4::Runti
meException' (compilation du fichier source src\ANTLRInputStream.cpp) [D:\projects\antlr\antlr4-4.10.1\runtime\Cpp\runtime\antlr4cpp-vs2019.vcxproj]
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.28.29910\include\vcruntime_exception.h(48): message : voir la déclaration de 'std::exception' (compilation du fich
ier source src\ANTLRInputStream.cpp) [D:\projects\antlr\antlr4-4.10.1\runtime\Cpp\runtime\antlr4cpp-vs2019.vcxproj]
D:\projects\antlr\antlr4-4.10.1\runtime\Cpp\runtime\src\Exceptions.h(13): message : voir la déclaration de 'antlr4::RuntimeException' (compilation du fichier source src\ANTLRInputStream.cpp) [D
:\projects\antlr\antlr4-4.10.1\runtime\Cpp\runtime\antlr4cpp-vs2019.vcxproj]
D:\projects\antlr\antlr4-4.10.1\runtime\Cpp\runtime\src\Exceptions.h(13,67): warning C4275: interface non dll class 'std::exception' utilisée comme base d'une interface dll class 'antlr4::Runti
meException' (compilation du fichier source src\atn\ATN.cpp) [D:\projects\antlr\antlr4-4.10.1\runtime\Cpp\runtime\antlr4cpp-vs2019.vcxproj]
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.28.29910\include\vcruntime_exception.h(48): message : voir la déclaration de 'std::exception' (compilation du fich
ier source src\atn\ATN.cpp) [D:\projects\antlr\antlr4-4.10.1\runtime\Cpp\runtime\antlr4cpp-vs2019.vcxproj]
D:\projects\antlr\antlr4-4.10.1\runtime\Cpp\runtime\src\Exceptions.h(13): message : voir la déclaration de 'antlr4::RuntimeException' (compilation du fichier source src\atn\ATN.cpp) [D:\project
s\antlr\antlr4-4.10.1\runtime\Cpp\runtime\antlr4cpp-vs2019.vcxproj]
D:\projects\antlr\antlr4-4.10.1\runtime\Cpp\runtime\src\Exceptions.h(73,62): warning C4275: interface non dll class 'std::exception' utilisée comme base d'une interface dll class 'antlr4::IOExc
eption' (compilation du fichier source src\ANTLRInputStream.cpp) [D:\projects\antlr\antlr4-4.10.1\runtime\Cpp\runtime\antlr4cpp-vs2019.vcxproj]
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.28.29910\include\vcruntime_exception.h(48): message : voir la déclaration de 'std::exception' (compilation du fich
ier source src\ANTLRInputStream.cpp) [D:\projects\antlr\antlr4-4.10.1\runtime\Cpp\runtime\antlr4cpp-vs2019.vcxproj]
D:\projects\antlr\antlr4-4.10.1\runtime\Cpp\runtime\src\Exceptions.h(73): message : voir la déclaration de 'antlr4::IOException' (compilation du fichier source src\ANTLRInputStream.cpp) [D:\pro
jects\antlr\antlr4-4.10.1\runtime\Cpp\runtime\antlr4cpp-vs2019.vcxproj]
D:\projects\antlr\antlr4-4.10.1\runtime\Cpp\runtime\src\Exceptions.h(73,62): warning C4275: interface non dll class 'std::exception' utilisée comme base d'une interface dll class 'antlr4::IOExc
eption' (compilation du fichier source src\atn\ATN.cpp) [D:\projects\antlr\antlr4-4.10.1\runtime\Cpp\runtime\antlr4cpp-vs2019.vcxproj]
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.28.29910\include\vcruntime_exception.h(48): message : voir la déclaration de 'std::exception' (compilation du fich
ier source src\atn\ATN.cpp) [D:\projects\antlr\antlr4-4.10.1\runtime\Cpp\runtime\antlr4cpp-vs2019.vcxproj]
D:\projects\antlr\antlr4-4.10.1\runtime\Cpp\runtime\src\Exceptions.h(73): message : voir la déclaration de 'antlr4::IOException' (compilation du fichier source src\atn\ATN.cpp) [D:\projects\ant
lr\antlr4-4.10.1\runtime\Cpp\runtime\antlr4cpp-vs2019.vcxproj]
D:\projects\antlr\antlr4-4.10.1\runtime\Cpp\runtime\src\Exceptions.h(13,67): warning C4275: interface non dll class 'std::exception' utilisée comme base d'une interface dll class 'antlr4::Runti
meException' (compilation du fichier source src\atn\ActionTransition.cpp) [D:\projects\antlr\antlr4-4.10.1\runtime\Cpp\runtime\antlr4cpp-vs2019.vcxproj]
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.28.29910\include\vcruntime_exception.h(48): message : voir la déclaration de 'std::exception' (compilation du fich
ier source src\atn\ActionTransition.cpp) [D:\projects\antlr\antlr4-4.10.1\runtime\Cpp\runtime\antlr4cpp-vs2019.vcxproj]
D:\projects\antlr\antlr4-4.10.1\runtime\Cpp\runtime\src\Exceptions.h(13): message : voir la déclaration de 'antlr4::RuntimeException' (compilation du fichier source src\atn\ActionTransition.cpp
) [D:\projects\antlr\antlr4-4.10.1\runtime\Cpp\runtime\antlr4cpp-vs2019.vcxproj]
D:\projects\antlr\antlr4-4.10.1\runtime\Cpp\runtime\src\Exceptions.h(73,62): warning C4275: interface non dll class 'std::exception' utilisée comme base d'une interface dll class 'antlr4::IOExc
eption' (compilation du fichier source src\atn\ActionTransition.cpp) [D:\projects\antlr\antlr4-4.10.1\runtime\Cpp\runtime\antlr4cpp-vs2019.vcxproj]
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.28.29910\include\vcruntime_exception.h(48): message : voir la déclaration de 'std::exception' (compilation du fich
ier source src\atn\ActionTransition.cpp) [D:\projects\antlr\antlr4-4.10.1\runtime\Cpp\runtime\antlr4cpp-vs2019.vcxproj]
D:\projects\antlr\antlr4-4.10.1\runtime\Cpp\runtime\src\Exceptions.h(73): message : voir la déclaration de 'antlr4::IOException' (compilation du fichier source src\atn\ActionTransition.cpp) [D:
\projects\antlr\antlr4-4.10.1\runtime\Cpp\runtime\antlr4cpp-vs2019.vcxproj]
D:\projects\antlr\antlr4-4.10.1\runtime\Cpp\runtime\src\Exceptions.h(13,67): warning C4275: interface non dll class 'std::exception' utilisée comme base d'une interface dll class 'antlr4::Runti
meException' (compilation du fichier source src\ANTLRErrorListener.cpp) [D:\projects\antlr\antlr4-4.10.1\runtime\Cpp\runtime\antlr4cpp-vs2019.vcxproj]
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.28.29910\include\vcruntime_exception.h(48): message : voir la déclaration de 'std::exception' (compilation du fich
ier source src\ANTLRErrorListener.cpp) [D:\projects\antlr\antlr4-4.10.1\runtime\Cpp\runtime\antlr4cpp-vs2019.vcxproj]
D:\projects\antlr\antlr4-4.10.1\runtime\Cpp\runtime\src\Exceptions.h(13): message : voir la déclaration de 'antlr4::RuntimeException' (compilation du fichier source src\ANTLRErrorListener.cpp)
[D:\projects\antlr\antlr4-4.10.1\runtime\Cpp\runtime\antlr4cpp-vs2019.vcxproj]
D:\projects\antlr\antlr4-4.10.1\runtime\Cpp\runtime\src\Exceptions.h(73,62): warning C4275: interface non dll class 'std::exception' utilisée comme base d'une interface dll class 'antlr4::IOExc
eption' (compilation du fichier source src\ANTLRErrorListener.cpp) [D:\projects\antlr\antlr4-4.10.1\runtime\Cpp\runtime\antlr4cpp-vs2019.vcxproj]
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.28.29910\include\vcruntime_exception.h(48): message : voir la déclaration de 'std::exception' (compilation du fich
ier source src\ANTLRErrorListener.cpp) [D:\projects\antlr\antlr4-4.10.1\runtime\Cpp\runtime\antlr4cpp-vs2019.vcxproj]
D:\projects\antlr\antlr4-4.10.1\runtime\Cpp\runtime\src\Exceptions.h(73): message : voir la déclaration de 'antlr4::IOException' (compilation du fichier source src\ANTLRErrorListener.cpp) [D:\p
rojects\antlr\antlr4-4.10.1\runtime\Cpp\runtime\antlr4cpp-vs2019.vcxproj]
D:\projects\antlr\antlr4-4.10.1\runtime\Cpp\runtime\src\Exceptions.h(13,67): warning C4275: interface non dll class 'std::exception' utilisée comme base d'une interface dll class 'antlr4::Runti
meException' (compilation du fichier source src\atn\ArrayPredictionContext.cpp) [D:\projects\antlr\antlr4-4.10.1\runtime\Cpp\runtime\antlr4cpp-vs2019.vcxproj]
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.28.29910\include\vcruntime_exception.h(48): message : voir la déclaration de 'std::exception' (compilation du fich
ier source src\atn\ArrayPredictionContext.cpp) [D:\projects\antlr\antlr4-4.10.1\runtime\Cpp\runtime\antlr4cpp-vs2019.vcxproj]
D:\projects\antlr\antlr4-4.10.1\runtime\Cpp\runtime\src\Exceptions.h(13): message : voir la déclaration de 'antlr4::RuntimeException' (compilation du fichier source src\atn\ArrayPredictionConte
xt.cpp) [D:\projects\antlr\antlr4-4.10.1\runtime\Cpp\runtime\antlr4cpp-vs2019.vcxproj]
D:\projects\antlr\antlr4-4.10.1\runtime\Cpp\runtime\src\Exceptions.h(73,62): warning C4275: interface non dll class 'std::exception' utilisée comme base d'une interface dll class 'antlr4::IOExc
eption' (compilation du fichier source src\atn\ArrayPredictionContext.cpp) [D:\projects\antlr\antlr4-4.10.1\runtime\Cpp\runtime\antlr4cpp-vs2019.vcxproj]
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.28.29910\include\vcruntime_exception.h(48): message : voir la déclaration de 'std::exception' (compilation du fich
ier source src\atn\ArrayPredictionContext.cpp) [D:\projects\antlr\antlr4-4.10.1\runtime\Cpp\runtime\antlr4cpp-vs2019.vcxproj]
D:\projects\antlr\antlr4-4.10.1\runtime\Cpp\runtime\src\Exceptions.h(73): message : voir la déclaration de 'antlr4::IOException' (compilation du fichier source src\atn\ArrayPredictionContext.cp
p) [D:\projects\antlr\antlr4-4.10.1\runtime\Cpp\runtime\antlr4cpp-vs2019.vcxproj]
Tentative d'annulation de la génération en cours...
Génération du projet "D:\projects\antlr\antlr4-4.10.1\runtime\Cpp\runtime\antlr4cpp-vs2019.vcxproj" terminée (rebuild cible(s)) -- ÉCHEC.
ÉCHEC de la build.
Even the tag 4.10.1 does not compile
Yes, because it was not checked before release.
When this PR https://github.com/antlr/antlr4/pull/3725 will be applied?
Not sooner than Windows CI for C++ is fixed (see comments). But I can just to ignore these test if you'd like to get fixes ASAP.
Not really needed. Just give me a release that compile fine with vs2019
@KvanTTT Could you tell me which tag/release is the good one for getting a clean compile with vS2019?
You can get the solution from my branch runtime-tests-fixes.
@KvanTTT I cloned your repo/branch as stated. There are 2 errors
"D:\projects\antlr\antlr4-3725\runtime\Cpp\runtime\antlr4cpp-vs2019.vcxproj" (rebuild cible) (1) ->
(ClCompile cible) ->
D:\projects\antlr\antlr4-3725\runtime\Cpp\runtime\src\ANTLRFileStream.cpp(17,34): error C2039: 's2ws' n'est pas membre de 'antlrcpp' [D:\projects\antlr\antlr4-3725\runtime\Cpp\runtime\antlr4c
pp-vs2019.vcxproj]
D:\projects\antlr\antlr4-3725\runtime\Cpp\runtime\src\ANTLRFileStream.cpp(17,38): error C3861: 's2ws' : identificateur introuvable [D:\projects\antlr\antlr4-3725\runtime\Cpp\runtime\antlr4cpp
-vs2019.vcxproj]
215 Avertissement(s)
2 Erreur(s)
Weird, I'll take a look later. I have building without errors.
Applying the fix leads now to
1> Création de la bibliothèque D:\projects\antlr\antlr4-3725\runtime\Cpp\runtime\bin\vs-2019\x64\Debug DLL\antlr4-runtime.lib et de l'objet D:\projects\antlr\antlr4-3725\runtime\Cpp\runtime\bin\vs-2019\x64\Debug DLL\antlr4-runtime.exp
1>ANTLRInputStream.obj : error LNK2019: symbole externe non résolu "public: static class std::optional<class std::basic_string<char32_t,struct std::char_traits<char32_t>,class std::allocator<char32_t> > > __cdecl antlrcpp::Utf8::strictDecode(class std::basic_string_view<char,struct std::char_traits<char> >)" (?strictDecode@Utf8@antlrcpp@@SA?AV?$optional@V?$basic_string@_UU?$char_traits@_U@std@@V?$allocator@_U@2@@std@@@std@@V?$basic_string_view@DU?$char_traits@D@std@@@4@@Z) référencé dans la fonction "public: virtual void __cdecl antlr4::ANTLRInputStream::load(char const *,unsigned __int64,bool)" (?load@ANTLRInputStream@antlr4@@UEAAXPEBD_K_N@Z)
1>ANTLRInputStream.obj : error LNK2019: symbole externe non résolu "public: static class std::basic_string<char32_t,struct std::char_traits<char32_t>,class std::allocator<char32_t> > __cdecl antlrcpp::Utf8::lenientDecode(class std::basic_string_view<char,struct std::char_traits<char> >)" (?lenientDecode@Utf8@antlrcpp@@SA?AV?$basic_string@_UU?$char_traits@_U@std@@V?$allocator@_U@2@@std@@V?$basic_string_view@DU?$char_traits@D@std@@@4@@Z) référencé dans la fonction "public: virtual void __cdecl antlr4::ANTLRInputStream::load(char const *,unsigned __int64,bool)" (?load@ANTLRInputStream@antlr4@@UEAAXPEBD_K_N@Z)
1>ANTLRInputStream.obj : error LNK2019: symbole externe non résolu "public: static class std::optional<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > > __cdecl antlrcpp::Utf8::strictEncode(class std::basic_string_view<char32_t,struct std::char_traits<char32_t> >)" (?strictEncode@Utf8@antlrcpp@@SA?AV?$optional@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@std@@V?$basic_string_view@_UU?$char_traits@_U@std@@@4@@Z) référencé dans la fonction "public: virtual class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __cdecl antlr4::ANTLRInputStream::getText(class antlr4::misc::Interval const &)" (?getText@ANTLRInputStream@antlr4@@UEAA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AEBVInterval@misc@2@@Z)
1>UnbufferedCharStream.obj : error LNK2001: symbole externe non résolu "public: static class std::optional<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > > __cdecl antlrcpp::Utf8::strictEncode(class std::basic_string_view<char32_t,struct std::char_traits<char32_t> >)" (?strictEncode@Utf8@antlrcpp@@SA?AV?$optional@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@std@@V?$basic_string_view@_UU?$char_traits@_U@std@@@4@@Z)
1>D:\projects\antlr\antlr4-3725\runtime\Cpp\runtime\bin\vs-2019\x64\Debug DLL\antlr4-runtime.dll : fatal error LNK1120: 3 externes non résolus
Could you please use English locale for error messages?
"error LNK2019: symbole externe non résolu" means external symbol unresolved. The remainging is pure C++ mangling stuff
Adding Utf8.h/cpp to support directory solves the linker issue
By the way, the antlr4-vs2019.vcxproj does not build the x64 binaries Below the Win32 build with the build directory named x86
below the x64 build with the build directory named x64
I cloned your repo/branch as stated. There are 2 errors
I had these errors only for demo app, but I've also already fixed it.
Could you make this warning ignored. It pollutes a lot the compiling log
xceptions.h(13): warning C4275: interface non dll class 'std::exception' utilisée comme base d'une interface dll class
I doubt I can. It's out of my priority for now and I'm not very experienced in C++. Maybe @jcking could help.
Here the fix: In antlr4-common.h, could you add the line below at line 44
#pragma warning (disable: 4275) // non interface dll class
Could you suggest a fix? Experienced guys will take a look.
The fix is in the comment above your last note
I made the PR #3741 for building the ANTLR4 C++ Runtime as 3 Nuget packages. This PR does not change anything, just add a directory.
I am also unable to compile the runtime. I am just starting with ANTLR4 to get familiar with it. We want to use it to replace the proprietary parsers in SourceMonitor.
@ThirtySomething Meantime the master branch be fixed, you can get this PR to compile the ANTLR C++ runtime: PR3741
@zosrothko thanks for the hint. Unfortunately I don't know how to handle this. Until I've startet to maintain SourceMonitor a few months ago, I was using git/GitHub as single developer like SVN... Do I have to fork your fork of ANTLR4 to get the the PR?
@ThirtySomething Meantime the master branch be fixed, you can get this PR to compile the ANTLR C++ runtime: https://github.com/antlr/antlr4/pull/3741
Not master
but may be dev
.
@zosrothko @KvanTTT I've did a local checkout of zosrothko/antlr4, switched to the dev branch and the compile works well. Thank you for your support.
@zosrothko I guess the issue can be closed.
I would welcome the merge of @zosrothko's PR. There are differences between the dev branch of ANTLR and zosrothko's dev branch resulting in inconsistencies between the generated code and the runtime.
Could you point the differences between ANTLR and @zosrothko's dev branches?
@KvanTTT I'm sorry, there was a problem with my setup. I was a little bit confused about the different repos and branches. But I've got my project compiling. The compile errors belong to a misconfiguration of my project and not to the different repos/branches. With the ANTLR4/dev branch everything works well.
@parrt or @zosrothko please close the issue.
Hello
Building the VS2019 C++ runtime for the master branch version 4.10.2-SNAPSHOT does not build. See the log below
L'opération de génération a démarré...