User forums > Using Code::Blocks

Couple of custom makefile/compiler Q's

(1/2) > >>

griffin2000:
I'm new to CodeBlocks, pretty impressed so far but I'm having a couple of issues:

I have a project using a custom makefile (and a custom compiler).  

I have my project compiliing successfully, though I have to uncheck the "build this target with All" option.  

The first problem I have is that the clean make command is hardcoded..  The arguments our makefile takes to build our project are in the format:
"make platform target"

So if I make a CodeBlocks target called "A B" where A is the platform (PC, etc) and B is the target (Debug, Release, Final).  Building the project works fine (so long as I uncheck the "build this target with All" option in the build options), but when I try and clean the project it automatically calls:
"make clean_A"

Which doesn't exist so it fails.  What I want is for it to call "make A clean", how do I define this ?  I cannot change the makefile (as it would effect other people in my group, who don't use CodeBlocks and rely on the format as it is)

The second problem I have is debugging the app.  My makefile spits out a custom binary (.xyz)  I define this file as the "output file" in properties->target.  Regardless of what I define as the debugger executable in the compiler options (I have both a version of gbd that works with these binary files, and a custom windows GUI debugger) I get a "debugger executable is not set" error.

Any ideas how to fix this ?

Thanks all


griffin2000:
Ahh ok I fixed the second of these errors... I didn't see the comment about the /bin folder, if I set the folder to myFiles rather than myFiles/bin it invokes my GDB fine.  However...  It looks like there may be differences between out version of GDB and the the interface CodeBlocks requires.

I get these kind of errors;
Compiling: done
Starting debugger: done
Adding source dir: C:\p4_perforce.z-axis.com1666_gmorgans\AGT\Internal\Tools\TestBed\
Adding file: ..\..\..\build\TestBed-debug.elf
A syntax error in expression, near `-console on'.
error
error
error
Continuing...
The program is not being run.
error

Is there any documentation on what behavior/parameters CodeBlocks expects from its debugger ?  Or a way to get more verbose output ?

Methedrine:
At least for the debugger I can say that you have to use GDB 6.3 ... I couldn't debug with any earlier version either :)

mandrav:

--- Quote ---The first problem I have is that the clean make command is hardcoded..
--- End quote ---

Try [Project->Build options->"Make" commands]...

griffin2000:

--- Quote from: mandrav on September 20, 2006, 12:37:53 am ---
--- Quote ---The first problem I have is that the clean make command is hardcoded..
--- End quote ---

Try [Project->Build options->"Make" commands]...

--- End quote ---

I don't get this option... I get "compiler", "linker", "directories", etc.  No "make" commands options.

Navigation

[0] Message Index

[#] Next page

Go to full version