How to switch between debugging and releasing Makefiles in an Eclipse CDT?

For example, I have 2 Makefiles: Makefile.Debugand Makefile.Release.

I can switch between them by setting different commands in:

C / C ++ Build -> Builder Settings -> build command: make -f Makefile.Debug -j4or make -f Makefile.Release -j4, but how can I switch between two makefiles in the Eclipse GUI (as in Visual Studio debug / release configurations)?

enter image description here

+4
source share
1 answer

Create two build configurations in Eclipse, each of which has a different make command. You can then click the down arrow next to the hammer in the top Eclipse panel to switch the configuration.

Detailed instructions:

  • ,
  • , C/++ Build
  • , " ..."
  • "" " : xxxxx"
  • Ok
  • Ok
  • , ( C/++ Build " " " " " Builder", , " " " "
  • OK

( Eclipse , , .)

+4

All Articles