How to compile with -ggdb3
-
I have a Qt application that runs on a headless Raspberry Pi. The build environment was built via:
cd <project_dir> mkdir build cd build /usr/lib/qt6/bin/qt-cmake ../src/and I compile with
cmake -build . -j 4Q: How can I compile it with gdb fully enabled, ie, with -ggdb3?
-
I have a Qt application that runs on a headless Raspberry Pi. The build environment was built via:
cd <project_dir> mkdir build cd build /usr/lib/qt6/bin/qt-cmake ../src/and I compile with
cmake -build . -j 4Q: How can I compile it with gdb fully enabled, ie, with -ggdb3?
First step is to make debug build:
/usr/lib/qt6/bin/qt-cmake -DCMAKE_BUILD_TYPE=Debug ../src/If you are using a GCC tool chain then this will build your executables with debug symbols that
gdbcan work with using the-goption:make VERBOSE=1 ... /usr/bin/c++ -g ...If you must force the
-ggdboptionor the-gnvariations then you'll likely have to do that that manually in the CFLAGS and CXXFLAGS. -
G gone_bush has marked this topic as solved on