Menu

#576 Add case sensitivity for header/source search under case-sensitive systems

Undefined
open
nobody
Undefined
2017-11-29
2017-11-28
TSM
No

For instance, all FLTK headers end with .H and not .h. That makes it impossible for parser to detect those files on GNU/Linux and similar OSes.
Adding "H" into extension list manually doesn't help.

Discussion

  • Teodor Petrov

    Teodor Petrov - 2017-11-28

    Can you provide more details about the problem?
    Because there are plenty of places where headers/sources are searched and it is not clear from your explanation what exactly are you talking about.

     
    • TSM

      TSM - 2017-11-29

      It should be easy to reproduce: just create two header files in one of directories defined in the compiler search path (e.g. /usr/include), one with .H extension and another one with .h, make some definitions in them and reparse the project.
      You should see that #include autocompletion works with .h file but not with .H; also, if you include .H header manually, code completion won't finish definitions from it.

       
  • ollydbg

    ollydbg - 2017-11-29

    Some related discussion here: wxFileExists/wxDir::GetAllFiles difference; does this inconsistency is filesystem relative or not?

    I just check the CC plugin parser's code, see that it use this function:

    wxArrayString ParserBase::FindFileInIncludeDirs(const wxString& file, bool firstonly)
    {
        wxArrayString FoundSet;
        for (size_t idxSearch = 0; idxSearch < m_IncludeDirs.GetCount(); ++idxSearch)
        {
            wxString base = m_IncludeDirs[idxSearch];
            wxFileName tmp = file;
            NormalizePath(tmp,base);
            wxString fullname = tmp.GetFullPath();
            if (wxFileExists(fullname))
            {
                FoundSet.Add(fullname);
                if (firstonly)
                    break;
            }
        }
    
        TRACE(_T("ParserBase::FindFileInIncludeDirs(): Searching %s"), file.wx_str());
        TRACE(_T("ParserBase::FindFileInIncludeDirs(): Found %lu"), static_cast<unsigned long>(FoundSet.GetCount()));
    
        return FoundSet;
    }
    
     
  • ollydbg

    ollydbg - 2017-11-29
    • labels: --> CodeCompletion
     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.