Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Failed to parse the file" when using precompiled headers #44

Open
vincent-breysse opened this issue May 5, 2019 · 1 comment
Open

Comments

@vincent-breysse
Copy link

Hi there, I can't get company working correctly with precompiled headers, nor with cotire, nor manually, otherwise it works perfectly fine.

So my project is organized in a typical way, I have the root containing the first CMakeLists.txt, with build/src/extlib/include... sub folders.

I have generated cmake files in the build directory, and created the json database with the appropriate flags, here is a typical command line :
"command": "/usr/bin/c++ . . . -Winvalid-pch -include /path/to/pch.hpp -std=gnu++1z -o CMakeFiles/main.dir/main.cpp.o -c /path/to/main.cpp",

Now when I open main.cpp with emacs, I get the following error message :
Error from syntax checker irony: Irony-Mode server error: parse-error, "failed to parse file", "/path/to/main.cpp"

after typing some things I get

Irony I/O task: error in callback: (irony-server-error complete-error "failed to perform code completion" "path/to/main.cpp" 15 5)

From what I have tested, removing the "-include ", or the .gch file generated corrects the problem.

@f-michaut
Copy link

I am observing the same issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants