Post Reply 
HPGCC 2.0 and Programmer's Notepad
04-05-2017, 01:47 PM
Post: #7
RE: HPGCC 2.0 and Programmer's Notepad
(04-05-2017 01:28 PM)Helix Wrote:  Thank you for these explanations.
I did find a simple tutorial on C, and I've had no difficulties so far in understanding the first concepts of this language. But this tutorial doesn't mention Makefiles. For example, it describes only three stages to produce binary code: preprosses – compile – link. So I'm learning here there are two more stages: make and assemble.

Now, my question is: why there is no Makefile with Code::Blocks?

Most modern compilers directly generate binary object files, skipping the intermediate assembler code. In some rare cases, assembler code is still used when extremely high performance, or low-level hardware access is required. When learning a new language, you can generally forget about the assembler step.

Makefiles are used to automate the building (compiling, linking, etc.) of complex programs typically comprised of multiple (sometimes many) program files. The 'makefile' defines both the steps required to build the program as well as the relationships among the files (e.g. if file b must be changed, one must also compile file c again as well, because it includes file b as part of it's system).

So when learning a new language with a single source file, the additional complexity of a makefile can seem like it isn't adding much value, but it's best to learn to use them from the beginning; as your skills and project complexity grow, it will be easy to extend your makefile to keep track of how to build your project, plus it's a heck of lot easier to just type "make project1" than all the tedious compiler and linker commands with precise options and syntax.

--Bob Prosperi
Find all posts by this user
Quote this message in a reply
Post Reply 

Messages In This Thread
HPGCC 2.0 and Programmer's Notepad - Helix - 04-03-2017, 12:19 AM
RE: HPGCC 2.0 and Programmer's Notepad - rprosperi - 04-05-2017 01:47 PM

User(s) browsing this thread: 1 Guest(s)