Consider that in a file named "priv.c", I have:
And in another file named "pub.c", I have:Code:int multiply(int n, int m) { return n * m; }
Then I go ahead and build a static library using:Code:int multiply(int n, int m); int square(int n) { return multiply(n, n); }
This library will contain definitions for both "square" and "multiply". I'm wondering how I might go about hiding the definition for "multiply" in "libsquare.a". Essentially, I'm looking for a way to categorise some functions as "local" and others as "global".cc -c priv.c pub.c
ar rcs libsquare.a priv.o pub.o
I kindly welcome all thoughts and suggestions.