I wasn't specific enough.
No, you weren't.
could someone point at some web
site? or write steps making static library? I googled but
no luck with answer that I wanted
And still aren't.
You haven't come close to explaining what it is that you want to do.
The answer is *probably* system-specific.
Questions you might have in mind:
* Do you want to design some code with intent that it be used
as a library?
* Do you want to know the mechanics of how to take code you've already
got and put it into a library file of some sort that can be linked into
many programs without being recompiled?
* Do you want to know something else entirely?
The problem here is that, so far as I can tell, you don't actually know
what "a library" is in enough detail to have any idea what you're asking
about. This is like having someone who's never looked at any kind of
medical text or studied anatomy ask how to go about "surgery".
2nd, I see sometimes macro with something like _prototype
I'm guessing they're doing it for portability. hope some-
one can tell me how to build library with _prototype macro.
or explain briefly what that _prototype macro used for
Who knows? "Something like _prototype" is pretty vague. You know, I heard
someone speaking Chinese, he used a word that sounded something like pling,
can someone tell me what it meant? The computer had a message on the screen,
it was something like there was a problem, what specifically did it mean
by that message?
I might be able to guess at this one just because it's a very common thing
in old code. Long ago, C used to declare functions like this:
float foo();
that meant "somewhere out there is a function called foo, which returns
a float".
Starting with C89, C allowed declarations like this:
float foo(int);
that meant "somewhere out there is a function called foo, which returns
a float, and takes a single argument which is an int". This new kind of
declaration is called a "prototype".
Since not all compilers supported these, people tended to do fancy stuff
like:
#ifdef __STDC__
#define P(x) x
#else
#define P(x) ()
#endif
float foo P((int));
This technique has been pretty much irrelevant to nearly everyone for,
I'd guess, 15+ years now. There are a few people who still have reason to
use it, but here's the thing: If you don't already know about it, *you are
not one of those people*.
This has *nothing* to do with portability in any modern sense.
-s