News:

When registered with our forums, feel free to send a "here I am" post here to differ human beings from SPAM bots.

Main Menu

Compile only

Started by genech.lee, July 15, 2015, 07:45:04 AM

Previous topic - Next topic

genech.lee

Can I make Codeblocks only compile the file??? Whenever I press compile this file or build, it also assembles it!!! HELLLLPPPPPP

BlueHazzard

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

scarphin

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.