Setting up debugging and development environment
micky686 at gmail.com
Tue Mar 20 19:18:15 UTC 2018
using *cmake* with the *-D CMAKE_BUILD_TYPE=Debug* option
and then *make install*
creates an executable with debug symbols included.
On Tue, Mar 20, 2018 at 12:54 AM, Aleix Pol <aleixpol at kde.org> wrote:
> On Sun, Mar 18, 2018 at 4:47 PM, Miljenko Jakovljevic
> <micky686 at gmail.com> wrote:
> > Hi,
> > In order to be able to run kdevelop in gdb I have added this line to the
> > CMakeLists.txt file in the kdevelop root directory:
> > set(CMAKE_BUILD_TYPE, "debug")
> > set(CMAKE_CXX_FLAGS_DEBUG "-ggdb")
> > Then I use:
> > cmake CMakeLists.txt
> > make clean (without this the build often fails with the "main not found"
> > message)
> > make -j8
> > gdb kdevelop (gives: no debugging symbols found)
> > What am I doing wrong that the debug symbols are not set?
> > Is there a guide about the development environment for kdevelop or
> > more general?
> > Best regards!
> > Mili
> Hi Mijenko,
> You are not meant to modify the source directory, pass the variable
> names. Just pass them as arguments:
> cmake -DCMAKE_BUILD_TYPE=Debug ....
> Also you need to make sure you are running the software you just
> built. I'd recommend uninstalling the one the distro provides and
> installing to a separate prefix. Also note "make install" needs to be
> called so the binaries are placed somewhere useful.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the KDevelop-devel