19 lines
584 B
C
19 lines
584 B
C
#pragma once
|
|
#include <stdio.h> // Standard I/O header is needed here because printf is used within this header-only function.
|
|
|
|
#if defined(__cplusplus)
|
|
extern "C" {
|
|
#endif
|
|
|
|
// Declared as static to prevent multiple definition errors.
|
|
// Since this is a header-only function, it will be included and compiled
|
|
// into every translation unit that includes lib3.h. 'static' limits its
|
|
// linkage to the current translation unit, preventing linker conflicts.
|
|
static void lib3_function()
|
|
{
|
|
printf("This is a function from Header-Only Library 3.\n");
|
|
}
|
|
|
|
#if defined(__cplusplus)
|
|
}
|
|
#endif
|