Home Accessibility Courses Twitter The Mouth Facebook Resources Site Map About Us Contact
 
For 2023 (and 2024 ...) - we are now fully retired from IT training.
We have made many, many friends over 25 years of teaching about Python, Tcl, Perl, PHP, Lua, Java, C and C++ - and MySQL, Linux and Solaris/SunOS too. Our training notes are now very much out of date, but due to upward compatability most of our examples remain operational and even relevant ad you are welcome to make us if them "as seen" and at your own risk.

Lisa and I (Graham) now live in what was our training centre in Melksham - happy to meet with former delegates here - but do check ahead before coming round. We are far from inactive - rather, enjoying the times that we are retired but still healthy enough in mind and body to be active!

I am also active in many other area and still look after a lot of web sites - you can find an index ((here))
Turning C from source to a running program

With scripting languages (or near-scripting languages) such as shell, Tcl, Perl, Python and PHP, the developer just edits a file of program code, and tests it - the tools that he uses roll the translation of his source into something that can be run without him having to make further inputs. C is somewhat different .... to here's how to convert a C program from source to executable.

1. Enter your source code (a file extension .c is common).

2. Compile into an object file (extension .o or .obj). This is a binary file that contains machine code for the machine that you'll be running on, but it's not yet a complete program - it's a program component. In effect, your compiling has turned a raw potato into a roasted one, but it's still not a complete meal.

3. Link / Load / Taskbuild your .o or .obj files; that joins them together into a single conglomorate executable file, and brings in standard library files too, so that the file as a whole can be run. You have now added your Roast Beef, Yorkshire Pudding, and brussel sprouts and made up a complete course.

* The COMPILER will initally run the C pre-processor which will act on lines starting with a # character, allowing for other files to be included, constants defined, and selective debug code / system dependent code to be included as appropriate.

* The whole process of one or more compiles followed by a link may be defined in a makefile. The Makefile defines the commands necessary for each step of the process, and also lets you define which file depends on whihch other file - the net effect of this is to enable the compiler to skip over files that haven't been changed since you last did a compile by looking at the timestamp on the .c file in relation to the timestamp on the .o; very clever - I remember back to "pre-make" days and running compiles and loads of a big CAD system I wrote that took nearly an hour to process!
(written 2006-10-06)

 
Associated topics are indexed as below, or enter http://melksh.am/nnnn for individual articles
C202 - C and C based languages - A first practical program
  [2580] C course inspires new teaching examples - (2010-01-16)
  [3121] New year, new C Course - (2011-01-05)
  [3236] C - a first program that does something useful for you - (2011-04-09)
  [3590] Defining, declaring and initialising variables in C - (2012-01-24)
  [4337] Learning to program sample program - past its prime, but still useful - (2014-12-02)
  [4632] Remember to ask the question before you listen for the answer - (2016-01-26)

C201 - C and C based languages - C Language Fundamentals
  [1671] Compiling C programs with gcc - an overview - (2008-06-10)
  [2005] Variables and pointers and references - C and C++ - (2009-01-23)
  [2576] What does const mean? C and C++ - (2010-01-15)
  [2842] Staring a C course with Hello World - why? - (2010-06-30)
  [3120] Learning to write good programs in C and C++ - separating out repeated code - (2011-01-04)
  [3234] Your program - you just provide the filling in the sandwich - (2011-04-08)
  [3278] Do I need to initialise variables - programming in C, C++, Perl, PHP, Python, Ruby or Java. - (2011-05-05)
  [3591] Integer types, and integer overflows, in C - (2012-01-25)
  [3917] BODMAS - the order a computer evaluates arithmetic expressions - (2012-11-09)
  [4324] Learning to program - variables and constants - (2014-11-22)
  [4555] Preprocessor directives in C and C++ - what they mean - (2015-10-27)
  [4566] C - why is slow to write and debug) but fast to run? - (2015-11-01)


Back to
HTML tables - telling whats wrong from the display
Previous and next
or
Horse's mouth home
Forward to
Opening approaches!
Some other Articles
A pattern in change
Well House Manor Hotel, Melksham, Wiltshire
Open
Opening approaches!
Turning C from source to a running program
HTML tables - telling whats wrong from the display
Signs of Leek
Why do we still need C?
Drive time
Age discrimination law
4759 posts, page by page
Link to page ... 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96 at 50 posts per page


This is a page archived from The Horse's Mouth at http://www.wellho.net/horse/ - the diary and writings of Graham Ellis. Every attempt was made to provide current information at the time the page was written, but things do move forward in our business - new software releases, price changes, new techniques. Please check back via our main site for current courses, prices, versions, etc - any mention of a price in "The Horse's Mouth" cannot be taken as an offer to supply at that price.

Link to Ezine home page (for reading).
Link to Blogging home page (to add comments).

You can Add a comment or ranking to this page

© WELL HOUSE CONSULTANTS LTD., 2024: 48 Spa Road • Melksham, Wiltshire • United Kingdom • SN12 7NY
PH: 01144 1225 708225 • EMAIL: info@wellho.net • WEB: http://www.wellho.net • SKYPE: wellho

PAGE: http://www.wellho.net/mouth/888_.html • PAGE BUILT: Sun Oct 11 16:07:41 2020 • BUILD SYSTEM: JelliaJamb