<div dir="ltr"><div>Hello everyone,</div><div><br></div><div>I am currently using clang tooling for a tool on my own, and I recently started to develop it again.</div><div>I have a strange error while launching my binary</div>
<div><br></div><div>I got a lot of the followin</div><div><div><premain>: CommandLine Error: Argument 'version' defined more than once!</div><div><premain>: CommandLine Error: Argument 'print-all-options' defined more than once!</div>
<div><premain>: CommandLine Error: Argument 'print-options' defined more than once!</div><div><premain>: CommandLine Error: Argument 'help-hidden' defined more than once!</div><div><premain>: CommandLine Error: Argument 'help' defined more than once!</div>
<div><premain>: CommandLine Error: Argument 'help-list-hidden' defined more than once!</div><div><premain>: CommandLine Error: Argument 'help-list' defined more than once!</div><div><premain>: CommandLine Error: Argument 'debug-only' defined more than once!</div>
</div><div><br></div><div>So I tested back the example code from file:</div>~/llvm/tools/clang/include/clang/Tooling/CommonOptionsParser.h <div><br></div><div>Corrected for compilation errors:</div><div><div>#include <clang/Frontend/FrontendActions.h></div>
<div>#include <clang/Tooling/Tooling.h></div><div>#include <clang/Tooling/CommonOptionsParser.h></div><div>#include <llvm/Support/CommandLine.h></div><div><br></div><div>using namespace clang::tooling;</div>
<div>using namespace llvm;</div><div><br></div><div>static cl::extrahelp CommonHelp(CommonOptionsParser::HelpMessage);</div><div>static cl::extrahelp MoreHelp("\nMore help text...");</div><div>int main(int argc, const char **argv) {</div>
<div> CommonOptionsParser OptionsParser(argc, argv);</div><div> ClangTool Tool(OptionsParser.getCompilations(),</div><div> OptionsParser.getSourcePathList());</div><div> return Tool.run(newFrontendActionFactory<clang::SyntaxOnlyAction>());</div>
<div>}</div></div><div><br></div><div>And the errors still occurs.</div><div><br></div><div>I searched a little where it could came from, but I didn't find out.</div><div>I'll continue to search, but any help is welcome</div>
<div><br></div><div>Thanks,</div><div><div><br></div>-- <br>Armand Leclercq<br>EPITA 2013 Assistant C/Unix
</div></div>