Setting up debugging and development environment
Aleix Pol
aleixpol at kde.org
Mon Mar 19 23:54:29 UTC 2018
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 something
> 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.
https://community.kde.org/Guidelines_and_HOWTOs/Build_from_source#Set_up_the_runtime_environment
Aleix
More information about the KDevelop-devel
mailing list