cquery icon indicating copy to clipboard operation
cquery copied to clipboard

Unable to find file in windows

Open dotxnc opened this issue 7 years ago • 4 comments

After lots of looking around trying to find out what's going wrong I found this in cquery log.

[Error - 7:35:05 AM] Request textDocument/documentSymbol failed.
  Message: Unable to find file c:/users/patri/desktop/projects/cquery_test/src/test.hpp
  Code: -32603 
[Error - 7:35:05 AM] Request textDocument/documentLink failed.
  Message: Unable to find file c:/users/patri/desktop/projects/cquery_test/src/test.hpp
  Code: -32603 

That path is correct and opening it in explorer opens the file just fine. The actually include line works and ctrl+clicking opens the file like it should but for some reason because of this error my source files can't see the types and classes in the headers.

dotxnc avatar Jul 11 '18 11:07 dotxnc

This means the file is not indexed, does any .cc file in your project include it?

jacobdufault avatar Jul 12 '18 20:07 jacobdufault

Yeah, test.cc includes it and contains all the definitions for it. in case it helps, project set up is

.
├── .vscode
│   └── settings.json
└── src
    ├── .cquery
    ├── main.cc
    ├── test.cc
    └── test.hpp

and the .cquery file is setup as

%clang
%cpp -std=c++11
-IC:/MinGW/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++
-IC:/MinGW/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/x86_64-w64-mingw32
-IC:/MinGW/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/backward
-IC:/MinGW/lib/gcc/x86_64-w64-mingw32/8.1.0/include
-IC:/MinGW/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/tr1
-IC:/MinGW/x86_64-w64-mingw32/include

dotxnc avatar Jul 12 '18 21:07 dotxnc

As an update it looks like cquery thinks everthing is in the std namespace. trying to complete without std:: doesn't result in anything but with it seems to find all the functions and types in my headers. https://i.imgur.com/e0xxbsM.png vs https://i.imgur.com/M5sClHC.png

dotxnc avatar Jul 15 '18 05:07 dotxnc

me too

3038922 avatar Dec 18 '18 00:12 3038922