471,571 Members | 1,045 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,571 software developers and data experts.

Symbols in libs

I got some question about symbols in libraries ...

In libraries, there is public symbols and "not public" symbols
(private, static)... In C when we use the "static" keyword on the
declaration of a function, the function is not public in the library.

1- When I use a class, all is symbols are put in the public section of
the library. How can I change that. The keyword "private" in a class
is only for the langage or does it change (like "static") something in
libs ? Even in object file ?

2- Even symbols which are not "static" have there decorated name in
the library. (I use bindump to check that). How can I avoid that for
the private functions of my lib ?
What COFF is use for then ?

3- The keyword "static" is used to keep the use of something in the
file scope. If my lib is composed from many object file, how can I
"hide" private functions ?

Does somebody know how I can get a good documentation about library
files ?
Thanks
Jul 19 '05 #1
1 2171

"Torbak" <at*****@free.fr> wrote in message
news:f7**************************@posting.google.c om...
I got some question about symbols in libraries ...

The C++ language does not specify how symbols in libraries should work.
In libraries, there is public symbols and "not public" symbols
(private, static)... In C when we use the "static" keyword on the
declaration of a function, the function is not public in the library.

1- When I use a class, all is symbols are put in the public section of
the library. How can I change that. The keyword "private" in a class
is only for the langage or does it change (like "static") something in
libs ? Even in object file ?
Only for the language I guess. Consider a class split across two libraries.
If the private symbols where hidden somehow, how would a member function in
one library call a member function in the other.

2- Even symbols which are not "static" have there decorated name in
the library. (I use bindump to check that). How can I avoid that for
the private functions of my lib ?
This is not a language issue, consult your compiler docs.
What COFF is use for then ?
What is COFF, an object file format I think? Off topic on comp.lang.c++
anyway.

3- The keyword "static" is used to keep the use of something in the
file scope. If my lib is composed from many object file, how can I
"hide" private functions ?
Again the C++ language says nothing about symbols in libraries. Look to your
platform for a solution, it may not exist.

Does somebody know how I can get a good documentation about library
files ?
Try google.
Thanks


john
Jul 19 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

7 posts views Thread by Torbak | last post: by
1 post views Thread by Bernd Geiser | last post: by
2 posts views Thread by Shea Martin | last post: by
5 posts views Thread by eScrewDotCom | last post: by
6 posts views Thread by Hug | last post: by
2 posts views Thread by briseight | last post: by
4 posts views Thread by Gernot Frieslinger | last post: by
reply views Thread by XIAOLAOHU | last post: by
reply views Thread by leo001 | last post: by
reply views Thread by lumer26 | last post: by
reply views Thread by Vinnie | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.