cmake_tutorial/libs/lib1/src/lib1.c

12 lines
514 B
C

#include "lib1.h" // Include lib1's own header
#include "lib2.h" // Include lib2's header to call lib2_function
#include "lib3.h" // Include lib3's header to call lib3_function
#include <stdio.h> // Include standard I/O here, as printf is used in this source file.
void lib1_function(unsigned int i)
{
printf("This is a function from Library 1. %u\n", i);
lib2_function(); // Call function from lib2
lib3_function(); // Call function from lib3
printf("Lib1 has called functions from Lib2 and Lib3.\n");
}