User forums > General (but related to Code::Blocks)

calling compiler in "commands" section of build options

(1/1)

BrianSidebotham:
Hi guys,

Is there a variable I can use to call the compiler in the commands (post build) build options dialog for a target? I've tried $cc $(cc) $c $(c) but they all get omitted.

Thanks,

Brian.

thomas:
As of revision 3287, you can use TARGET_CC, TARGET_CPP, TARGET_LD, and TARGET_LIB.

EDIT: The "standard" variable $CC was purposely not used, since this might otherwise break builds that depend on $CC being set by the environment.
If you do have $CC on your environment, it will be replaced, by the way.

BrianSidebotham:
Hi thomas,

working under windows, so no $cc variable defined.

Either you typed very fast, or my question was extremely well timed. Am updating to svn 3287 now. I updated this morning, and got confused when I couldn't find TARGET_CC in the source when I read your reply.

Thanks very much, that's just what I needed!

thomas:

--- Quote from: BrianSidebotham on November 27, 2006, 04:04:39 pm ---I updated this morning, and got confused when I couldn't find TARGET_CC in the source when I read your reply.
--- End quote ---
That must be an interesting physical phenomenon related to electrons travelling faster than light and going back in time, because I posted the above (15:03:01 CET) only after committing the changes (15:01:25 CET) and re-updating. So, at any rate, I don't see how you could have read about TARGET_xxx without them being present in svn :)

Anyway, hope that solves your problem :)

BrianSidebotham:
I guess you just type fast! ;)

That's sorted everything. Thanks.

I created a compiler for avr-gcc. It could do with a custom project setup as it needs post build steps to extract different code sections to hex files using objcopy and objdump.

c::b doesn't have them setup as compiler programs, so it has to be hardcoded. :(

Maybe the avr-gcc compiler is of use to the c::b project?

Navigation

[0] Message Index

Go to full version