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

ccls can not use compile_command ? #771

Open
wutianjun5858 opened this issue Feb 24, 2021 · 0 comments
Open

ccls can not use compile_command ? #771

wutianjun5858 opened this issue Feb 24, 2021 · 0 comments

Comments

@wutianjun5858
Copy link

@wutianjun5858 wutianjun5858 commented Feb 24, 2021

ccls version: tag: 0.20201219

compile_commands.json

[
{
  "directory": "/home/tj/test/aaa/build",
  "command": "/usr/bin/c++ -DQT_CORE_LIB -DQT_DBUS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_NO_DEBUG -DQT_SQL_LIB -DQT_WIDGETS_LIB -isystem /usr/include/x86_64-linux-gnu/qt5 -isystem /usr/include/x86_64-linux-gnu/qt5/QtCore -isystem /usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++ -isystem /usr/include/x86_64-linux-gnu/qt5/QtWidgets -isystem /usr/include/x86_64-linux-gnu/qt5/QtGui -isystem /usr/include/x86_64-linux-gnu/qt5/QtNetwork -isystem /usr/include/x86_64-linux-gnu/qt5/QtDBus -isystem /usr/include/x86_64-linux-gnu/qt5/QtSql -fPIC -o CMakeFiles/aaa.dir/src/main.cpp.o -c /home/tj/test/aaa/src/main.cpp",
  "file": "/home/tj/test/aaa/src/main.cpp"
}
]

put compile_commands.json to the project root path directly, it can not work.
create .ccls, fill with %compile_commands.json, it can not work.
create .ccls, fill with below, it can work.

clang++

-DQT_CORE_LIB
-DQT_DBUS_LIB
-DQT_GUI_LIB
-DQT_NETWORK_LIB
-DQT_NO_DEBUG
-DQT_SQL_LIB
-DQT_WIDGETS_LIB
-isystem
/usr/include/x86_64-linux-gnu/qt5
-isystem
/usr/include/x86_64-linux-gnu/qt5/QtCore
-isystem
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++
-isystem
/usr/include/x86_64-linux-gnu/qt5/QtWidgets
-isystem
/usr/include/x86_64-linux-gnu/qt5/QtGui
-isystem
/usr/include/x86_64-linux-gnu/qt5/QtNetwork
-isystem
/usr/include/x86_64-linux-gnu/qt5/QtDBus
-isystem
/usr/include/x86_64-linux-gnu/qt5/QtSql

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

Successfully merging a pull request may close this issue.

None yet
1 participant