Question: Create a library. The library should contain two functions, Hello() and World(). Calling the Hello() function should print out the string Hello; calling the

Create a library. The library should contain two functions, Hello() and World(). Calling the Hello() function

Create a library. The library should contain two functions, Hello() and World(). Calling the Hello() function should print out the string "Hello"; calling the World() function should print out the string "World." [7 points] a) Write a simple program that uses the library (testing the use of the library). b) Create your own makefile that tests for the correct working of the functions. It should define two dependency/command blocks as: First block should give the dependencies for the object code file of the simple program that uses the library, as well as the command to compile the source code file into the object code file. Second block should define the use of the linking stage command. Therefore, the executable file of your program, its object code file (.o) and library file (.a) would be the dependencies part of this block.

Step by Step Solution

3.41 Rating (160 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

To create a library containing the two functions Hello and World we need to create a header file and a source file Header file C ifndef MYLIBH define MYLIBH void Hellovoid void Worldvoid endif Source ... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!