Author Topic: View all compiler commands  (Read 20050 times)

Offline Priit

  • Multiple posting newcomer
  • *
  • Posts: 12
View all compiler commands
« on: August 03, 2005, 06:59:52 pm »
Is there a 'box' where are listed all commands (CFLAGS when using gcc) that will be passed to compiler?

Using CB 1.0RC1-1 and Windows xp sp2

Offline rickg22

  • Lives here!
  • ****
  • Posts: 2283
Re: View all compiler commands
« Reply #1 on: August 03, 2005, 07:04:27 pm »
Yes, in compiler settings, advanced options, "show full command line" (it's in a combobox)

Offline Priit

  • Multiple posting newcomer
  • *
  • Posts: 12
Re: View all compiler commands
« Reply #2 on: August 03, 2005, 07:23:40 pm »
Yes, in compiler settings, advanced options, "show full command line" (it's in a combobox)

I knew that one. But i see these command when i am already compiling my project. I want to see them before.

And when i mark new compiler flag (for example strip executable), then it would be nice when -s appears in the 'box' in addition previous flags.

Like MSVC6 has/had.



Not from english speaking country :D

Offline rickg22

  • Lives here!
  • ****
  • Posts: 2283
Re: View all compiler commands
« Reply #3 on: August 03, 2005, 07:54:49 pm »
Hmmm mind providing us with some screenshots telling us exactly what is what you want to see?

Thanks.

Offline Priit

  • Multiple posting newcomer
  • *
  • Posts: 12
Re: View all compiler commands
« Reply #4 on: August 03, 2005, 08:19:17 pm »
http://www-nc.troja.mff.cuni.cz/~kodys/Work/Utils/CPPNewProj4.GIF

MSVC6. There is a 'box' (Project options) what i would like to see in CB too.

Offline rickg22

  • Lives here!
  • ****
  • Posts: 2283
Re: View all compiler commands
« Reply #5 on: August 03, 2005, 08:49:32 pm »
AHHHH so you want a visible rendering of the options you clicked, right?

(Just curious, why do you use it for?)

Offline Priit

  • Multiple posting newcomer
  • *
  • Posts: 12
Re: View all compiler commands
« Reply #6 on: August 03, 2005, 10:12:09 pm »
AHHHH so you want a visible rendering of the options you clicked, right?

(Just curious, why do you use it for?)

It helps to learn different compilers (digitalmars, mingw,  ms toolkit etc).
Sometimes i know a command i want to use...so instead spending time selecting/finding right line to check, i add it manually.
Sometimes i wan't to remove specific commandline option (the one i know)....so again it is easier to remove it manually.
.
.
.


I think it makes CB a better IDE :P



Offline rickg22

  • Lives here!
  • ****
  • Posts: 2283
Re: View all compiler commands
« Reply #7 on: August 03, 2005, 11:01:49 pm »
Hmmm.... so it's not just a display thing, you want to edit ALL the compiler flags manually.

Well um, there IS such an option. It's called "other options". Options are one per line (I think... I never asked Yiannis how that one works).
« Last Edit: August 03, 2005, 11:10:34 pm by rickg22 »

Offline Priit

  • Multiple posting newcomer
  • *
  • Posts: 12
Re: View all compiler commands
« Reply #8 on: August 04, 2005, 08:42:44 am »
Hmmm.... so it's not just a display thing, you want to edit ALL the compiler flags manually.

yes.
I want them to be linked with compiler flags tab. When i change something in one tab(compiler flags for example), then i see flags changed immediately in Other options tab and vice versa.


Well um, there IS such an option. It's called "other options". Options are one per line (I think... I never asked Yiannis how that one works).


Project-Build options-Other options tab....is that it?
If it is, then all i see is an empty box although i have marked some options in Compiler Flags tab :(
« Last Edit: August 04, 2005, 08:44:31 am by Priit »

Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Re: View all compiler commands
« Reply #9 on: August 04, 2005, 09:15:39 am »
That is because these are the "other" options. "Other" in the sense of "additional".
Whatever you enter in that box is concatenated to the compiler options that are generated by the checkboxes above. The two are *not* linked.
If one wants to make sure the exact options that are used, one can skip the buttons alltogether (or, you can give a few switches for sure, it does no harm. The last switch, in this case the one you type in, is always the one that counts. Thus, for example -O -O3 will be -O3.)
Like rickg22 said, the complete list is displayed with the full command line when compiling.
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

Offline tiwag

  • Developer
  • Lives here!
  • *****
  • Posts: 1196
  • sailing away ...
    • tiwag.cb
Re: View all compiler commands
« Reply #10 on: August 04, 2005, 09:26:05 am »
Hmmm.... so it's not just a display thing, you want to edit ALL the compiler flags manually.
yes.
I want them to be linked with compiler flags tab. When i change something in one tab(compiler flags for example), then i see flags changed immediately in Other options tab and vice versa.
That's a good idea, i second that- in the past i also wished to have at least a window what shows me the actually selected compiler & linker options

Well um, there IS such an option. It's called "other options". Options are one per line (I think... I never asked Yiannis how that one works).
unfortunately it is NOT exactly this,
because "Other-options" shows only options which are not covered by the already implemented options from the "Compiler flags" checkbox-list
as the name says exactly it shows - OTHER OPTIONS !
- and you are right, options are one by line

general comment:
the bad thing is - if you put an entry of an already implemented option manually in the "Other-options" list, it will be thrown away !!!
 - this behaviour should really be improved i think.
a simple improvement would be to write the actually used commandline-switch into the "Compiler flags" checkbox-list text-description.

Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Re: View all compiler commands
« Reply #11 on: August 04, 2005, 09:43:05 am »
general comment:
the bad thing is - if you put an entry of an already implemented option manually in the "Other-options" list, it will be thrown away !!!
Hmm... they're not precisely thrown away. What is done is that redundant entries are listed exactly once, which I think is pretty cool actually.

EDIT:
Getting back to the original question, this kind of "box" will probably be rather hard to implement. It is possible, without any doubt, but maybe the amount of work does not correlate to the benefit in this case?

What Priit asked for, if I am not mistaken, is a textedit field which receives events from the ckecklistbox and inserts text fragments accordingly, however still generates no redundant entries, and, at the same time parses input as you type, and sends events back to the checklistbox. That is already quite a lot to deal with to only support one compiler. Note that code::blocks can handle any number of compilers, so things get a lot more complicated (or must be farther abstracted).
« Last Edit: August 04, 2005, 10:06:26 am by thomas »
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

Offline tiwag

  • Developer
  • Lives here!
  • *****
  • Posts: 1196
  • sailing away ...
    • tiwag.cb
Re: View all compiler commands
« Reply #12 on: August 04, 2005, 10:07:26 am »
general comment:
the bad thing is - if you put an entry of an already implemented option manually in the "Other-options" list, it will be thrown away !!!
Hmm... they're not precisely thrown away. What is done is that redundant entries are listed exactly once, which I think is pretty cool actually.

That's what i've done in the past (before CB RC1) too, i wrote all options to the "Other options" list and they got saved to the *.cbp and
parsed and shown in the "Compiler Flags" checkbox-list afterwards.

That behaviour seems to be changed in the latest CB-cvs HEAD version - now they are thrown away as i described it.

@thomas
have you tried it with the latest RC1 ?

Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Re: View all compiler commands
« Reply #13 on: August 04, 2005, 10:09:42 am »
RC1, yes.

On first compile, the options are set twice, and on saving the project, only the checklistbox stays activated, the redundant one is eleminated.
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

Offline tiwag

  • Developer
  • Lives here!
  • *****
  • Posts: 1196
  • sailing away ...
    • tiwag.cb
Re: View all compiler commands
« Reply #14 on: August 04, 2005, 10:17:41 am »
RC1, yes.

On first compile, the options are set twice, and on saving the project, only the checklistbox stays activated, the redundant one is eleminated.

try the following:
1) create a new console application project using gcc and compile it.

2) then save, close and reopen the project,

3) add optimizing switches
Code: [Select]
-Os
-O1

to "Other options"

4) and save, close and reopen the project,

5) Do you find the optimizing switches anywhere ?

here by me they are thrown away,
the only possibility to set them is with the "Compiler Flags" checkbox-list.

thanks
« Last Edit: August 04, 2005, 10:19:20 am by tiwag »