Code::Blocks Forums

User forums => Help => Topic started by: visir on October 16, 2017, 08:45:03 am

Title: [solved]How to debug a program that was build by cmake? (setting paths)
Post by: visir on October 16, 2017, 08:45:03 am
Can't setup codeblocks to find the .exe file to debug, it just prints "No executable specified, use `target exec'."

Source files are in src/, exe file is in build/bin/. I've set build type to "Use makefile", even though it doesn't actually build anything (I'd prefer to not build anything with codeblocks for now, too complex).

What does the "Execution directory" mean in Project options->Project section? Is this where it will search for makefile? I have set it to full path to build/.

In Project options->Build targets, I've set "Output filename" to "build\bin\my.exe", and "Execution working dir" to "build\bin".

I'm still using gdb from 32bit mingw, this time for debugging a 64bit mingw-w64 compiled app. I wonder if that's the source of the problem. I'll try to switch for a moment... Yes, that was it. Solved.

By the way, if I'll click "don't annoy me again" on some message, how can I undo it later?
Title: Re: [solved]How to debug a program that was build by cmake? (setting paths)
Post by: oBFusCATed on October 16, 2017, 11:52:41 am
Have you tried to execute:
Code
$ cmake -G "CodeBlocks - Ninja" <path to project root>
or
$ cmake -G "CodeBlock - Unix Makefiles" <path to project root>

Unfortunately C::B is not really setup correctly to run project after they are installed (make install). So we need to work on this.