If you load up Exercise 5.2 and try to run it you will find that it fails to compile. You get the error:

assembler error: 
Function code '_lcd_start' not found assembler error:
Function code '_lcd_print' not found Build failed

This is because although we have generated proper calls the the functions at the moment they cannot be found when the program is actually to be constructed. You can split the building of a program down into two chunks:

  1. Compile the source files which are required

  2. Link them into a single program

We have taken steps to make sure that the first step succeeds, now we have to make sure that the second works as well. To do this we have to tell the compiler where to look for the lcdlib functions. We do this by creating a project file which gives SourceBoost the names of all the source files to be used to build the project, and the name of the assembler file to be created. On the right you can see the sequence to use to create the project "first.__c" which lets us use the lcd library with Program 5.2.

Create a new project file (first.__c) and add the Program 5.2 file (ex52.c) and the lcdlib.c file. Compile and run the project.

As we develop code which is useful we will put it into libraries for use later.