Author Topic: Compile only  (Read 3441 times)

genech.lee

  • Guest
Compile only
« on: July 15, 2015, 07:45:04 am »
Can I make Codeblocks only compile the file??? Whenever I press compile this file or build, it also assembles it!!! HELLLLPPPPPP

Offline BlueHazzard

  • Developer
  • Lives here!
  • *****
  • Posts: 3352
Re: Compile only
« Reply #1 on: July 15, 2015, 11:50:54 am »
in the Management->Projects tab right click on the file and "Build File"

or

in the menu bar:
"build"->"Compile current file"

or

shortcut:
Ctrl-Shift-F9

Offline scarphin

  • Lives here!
  • ****
  • Posts: 640
Re: Compile only
« Reply #2 on: July 15, 2015, 12:00:03 pm »
In gcc's terms compile means 'generate an assembler file from the source and assemble it'. In general terms compile means 'generate an object file from the source'. AFAIK Visual C/C++ doesn't even generate an assembler file during compilation so there's nothing wrong with Codeblocks' behavior. If you want an assembler output for some reason, you have to configure your compiler to generate one. For gcc it's the '-s' flag if I recall correctly. You can configure the command for 'compile single file to object' in 'settings->compiler->other settings->advanced options->command line macro' for your compiler.

Be aware that for gcc compilers if you configure the compilation step to generate an assembler output then you'll have to introduce an extra step to assemble to output into an object file.