User forums > Help
Debug with custom makefile
oZZ:
I'm bringing a project over that I previously developed on Eclipse so I'm using an existing makefile.
Everything compiles perfectly, but when I try to debug inside C::B sometimes it works, sometimes it just hangs at "Compiling:" in the Debugger window. My process view shows make running, but it just hangs.
Why does the debugger have to recompile after I've already regularly compiled it? (with -g) is it because I use a custom makefile? and if that's the case is there a setting somewhere that lets the debugger just use the existing binary file?
Thanks.
MortenMacFly:
--- Quote from: oZZ on October 05, 2006, 07:23:00 pm ---I'm bringing a project over that I previously developed on Eclipse so I'm using an existing makefile.
--- End quote ---
You completely forgot to add what version/OS you are using C::B with. So I can only guess:
If you are using a recent nightly be aware, that there are recent changes that may have broken the Makefile functionality. This hasn't yet been fuully tested so far. However: I can only strongly suggest to switch to the C::B build system instead of using Makefiles. You will then benefit from all the advantages C::B ships with in contrast to "makefile only".
With regards, Morten.
oZZ:
Thanks for the quick response. I switched to C::B's make system in the meantime, and it's working fine. I'm using nightly build on Windows.
I pretty much need to be using my makefile as I have a script that generates it for all compiling platforms, so I think I'm going to have to go back to Eclipse CDT (which has no/poor code completion, and that's what made me try C::B. Actually I have a fairly lengthy list of issues that I came across in C::B that I'm going to post in another thread.
If there's solutions to many of these right now then I can probably live with C::B's build system and not the Makefile.
-Shawn.
Game_Ender:
--- Quote from: MortenMacFly on October 05, 2006, 10:39:56 pm ---You will then benefit from all the advantages C::B ships with in contrast to "makefile only".
--- End quote ---
Yes but CB's project files aren't really any better than makefiles. If you wish your project to be cross platform you have to either develop multiple project files or maintain another build system in parallel, both of which the Code::Blocks project does itself. From the sound of if it looks as if the OP is using something like CMake. It might be advantageous for the OP to tweak his script to generate CB project files, to format is a pretty simple xml.
MortenMacFly:
--- Quote from: Game_Ender on October 09, 2006, 02:48:29 am ---Yes but CB's project files aren't really any better than makefiles.
--- End quote ---
No, I wouldn't say this for several reasons:
1.) The C::B build sytem is much faster than with Makefiles
2.) You not neccesarily need several project files to be cross-platform compatible. In fact I have quite some projects that compile just fine under Windows and Linux with a single project file. This is only different if libraries require different settings on different platforms. But with global variables and/or user variables you can even work-around this.
With regards, Morten.
Navigation
[0] Message Index
[#] Next page
Go to full version