3

I want to see the actual commands sent to g++ during a Code::Blocks build. I want to see exactly what command-line arguments it uses in the compile and link steps, and I don't want to have to poke around in the build settings GUI to do it.

Alternatively, converting the Code::Blocks project to an equivalent Makefile would work, but I see nowhere where I can do that, either...


Edit

I ended up using a Code::Blocks plugin, "cbMakeGen", to generate a makefile from which I removed some @s. Then I was able to see the commands. Surely there is an easier way...

Qantas 94 Heavy
  • 15,750
  • 31
  • 68
  • 83
Reinderien
  • 11,755
  • 5
  • 49
  • 77

2 Answers2

4

I see you already solved the problem, but there's still a bit more to that.

Code::Blocks can write a build log when the following option is checked: Settings->Compiler and debugger->Global compiler settings->{slide tabs to the right}->Build options tab->Save build log to HTML.

Besides, you can use "cbp2make" to convert Code::Blocks projects to makefiles. This is not a plugin like "cbMakeGen", but a stand-alone command-line tool. See also http://forums.codeblocks.org/index.php/topic,13675.0.html .

DDD
  • 157
  • 1
  • 3
1

Besides the logging to html you can also go to Settings->Compiler and debugger->Global compiler settings->{slide tabs to the right}->Other Settings and in that tab set 'Compiler Logging:' to 'full command line' (from drop down menu).

Now you can see the gcc command line in the console when you build.

MathKid
  • 1,903
  • 1
  • 21
  • 21