Better_Software_Header_MobileBetter_Software_Header_Web

Find what you need - explore our website and developer resources

Improving C++ Development in Visual Studio Code with compile_commands.json and Bear

QT += core gui widgets

CONFIG += c++11 link_pkgconfig
PKGCONFIG += glib-2.0

SOURCES += \
    main.cpp \
    mainwindow.cpp

HEADERS += \
    mainwindow.h

FORMS += \
    mainwindow.ui
$ cd ~/Documents/projects/build-TestQtApp
$ ~/Qt/5.15.2/gcc_64/bin/qmake ../TestQtApp
Info: creating stash file /home/milosz/Documents/projects/build-TestQtApp/.qmake.stash
$ sudo apt install bear
$ bear -- make
{
"arguments": [
"/usr/bin/x86_64-linux-gnu-g++-10",
"-c",
"-pipe",
"-O2",
"-std=gnu++11",
"-Wall",
"-Wextra",
"-D_REENTRANT",
"-fPIC",
"-DQT_NO_DEBUG",
"-DQT_WIDGETS_LIB",
"-DQT_GUI_LIB",
"-DQT_CORE_LIB",
"-I../TestQtApp",
"-I.",
"-I/usr/include/glib-2.0",
"-I/usr/lib/x86_64-linux-gnu/glib-2.0/include",
"-I../../../Qt/5.15.2/gcc_64/include",
"-I../../../Qt/5.15.2/gcc_64/include/QtWidgets",
"-I../../../Qt/5.15.2/gcc_64/include/QtGui",
"-I../../../Qt/5.15.2/gcc_64/include/QtCore",
"-I.",
"-I/usr/include/libdrm",
"-I.",
"-I../../../Qt/5.15.2/gcc_64/mkspecs/linux-g++",
"-o",
"main.o",
"../TestQtApp/main.cpp"
],
"directory": "/home/milosz/Documents/projects/build-TestQtApp",
"file": "/home/milosz/Documents/projects/build-TestQtApp/../TestQtApp/main.cpp",
"output": "/home/milosz/Documents/projects/build-TestQtApp/main.o"
}

About KDAB


2 Comments

10 - Aug - 2021

J. Holden

11 - Aug - 2021

Miłosz Kosobucki