I have several header files in a library: header1.h
, header2.h
...
I also have a general header file for the library: mylib.h
I want the user to import the main.h
file and get access to only some of the functions in the other header files.
For example, in the library:
// header1.h
void a(void);
void b(void);
-
// mylib.h
// I can't use this:
#include "header1.h"
// because it would make b function visible.
// Link to function a ????????
And in my main program:
// main.c
#include "mylib.h"
int main(void) {
a(); // Visible: no problem
b(); // Not visible: error
return 0;
}