<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-text-flowed" style="font-family: -moz-fixed;
      font-size: 12px;" lang="x-western">Hi,
      <br>
      <br>
      I'm having troubles to add a custom include path to a clang based
      C++ parser.
      <br>
      I'd like to properly support this opencv code under Linux:
      <br>
      <br>
      ...
      <br>
      #include "cv.h"
      <br>
      #include "highgui.h"
      <br>
      ...
      <br>
      <br>
      <br>
      This is what I'm using:
      <br>
      <br>
      TheCompInst->getHeaderSearchOpts().AddPath(StringRef("/usr/include/opencv"),clang::frontend::Quoted
      ,false, true, false, false, false);
      <br>
      <br>
      Note: I have tried also with clang::frontend::Angled without
      success.
      <br>
      Can you see the problem? Could you please say me where can I find
      some Clang 3.1 based related example?
      <br>
      <br>
      Many thanks in advance.
      <br>
      <br>
      <br>
      This is a more extended captured of how I am using "AddPath".
      <br>
      ...
      <br>
          CompilerInstance *TheCompInst = new CompilerInstance();
      <br>
       TheCompInst->getHeaderSearchOpts().AddPath(StringRef("/usr/include/opencv"),clang::frontend::Quoted

      ,false, true, false, false, false);
      <br>
          TheCompInst->createDiagnostics(0, 0);
      <br>
      <br>
          TargetOptions TO;
      <br>
          TO.Triple = llvm::sys::getDefaultTargetTriple();
      <br>
          TargetInfo *TI =
      TargetInfo::CreateTargetInfo(TheCompInst->getDiagnostics(),
      TO);
      <br>
          TheCompInst->setTarget(TI);
      <br>
      <br>
          TheCompInst->createFileManager();
      <br>
          FileManager &FileMgr = TheCompInst->getFileManager();
      <br>
          TheCompInst->createSourceManager(FileMgr);
      <br>
          SourceManager &SourceMgr =
      TheCompInst->getSourceManager();
      <br>
      <br>
          TheCompInst->createPreprocessor();
      <br>
          TheCompInst->createASTContext();
      <br>
      <br>
          Rewriter TheRewriter;
      <br>
          TheRewriter.setSourceMgr(SourceMgr,
      TheCompInst->getLangOpts());
      <br>
      ...
      <br>
      <br>
      <div class="moz-txt-sig"><span class="moz-txt-tag">-- <br>
        </span>===================================================================
        <br>
        Dr. Antonio Martínez Álvarez
        <br>
        Profesor Contratado Doctor (LOM-LOU)
        <br>
        Dept. Tecnología Informática y Computación (TIC)
        <br>
        Escuela Politécnica Superior
        <br>
        Universidad de Alicante
        <br>
        Campus de San Vicente
        <br>
        Ap. Correos 99, E-03080 Alicante
        <br>
        ESPAÑA (SPAIN)
        <br>
        email   : <a class="moz-txt-link-abbreviated"
          href="mailto:amartinez@dtic.ua.es">amartinez@dtic.ua.es</a>
        <br>
        Phone   : +34 965 90 34 00 (3043)
        <br>
        Fax     : +34 965 90 96 43
        <br>
===================================================================
        <br>
      </div>
    </div>
  </body>
</html>