473,486 Members | 1,953 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

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 2315

"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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
4358
by: Torbak | last post by:
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...
1
1873
by: Bernd Geiser | last post by:
Recently I tried the following: I created two libraries lib1.a and lib2.a. Both contain the object a.o which instantiates a class from b1.o (or b2.o respectively), where b1.o and b2.o have the...
2
1793
by: Shea Martin | last post by:
Solaris 9, Sun Workshop 5.0 I have ObjectA.o, ObjectB.o. ObjectA.o uses std::list. I created a archive of the objects: ar cvr libAB.a *.o. I have example.cc which I am trying to compile...
5
2976
by: eScrewDotCom | last post by:
www.eScrew.com eScrew Welcome to eScrew! eScrew is eScrew and this is eScrew story. eScrew will tell you eScrew story if you promise eScrew to consider eScrew story as joke. eScrew story is...
6
4755
by: Hug | last post by:
Hello everybody I try to use gdb to debug my program but i have this message : --------------------------- GNU gdb 5.3 Copyright 2002 Free Software Foundation, Inc. GDB is free software,...
6
2678
by: John | last post by:
I have 5 native static libraries that are being compiled in Visual Studio 2005 with the /MDd C Runtime option. I have 2 CLR DLLs (all managed code) in Visual Studio 2005 and the /MDd C Runtime...
1
3690
by: seba | last post by:
Hi everybody, I'm trying to debud a c++ program using gdb, but I have this problem. $ gdb GNU gdb Red Hat Linux (6.5-15.fc6rh) (gdb) file ./newcall Reading symbols from...
2
2329
by: briseight | last post by:
I'm trying to debug with gdb but I can read only some symbol. This is my main: /* Called from the main */ int main(int argc, char **argv) { int flags; /* register all codecs, demux and...
4
2615
by: Gernot Frieslinger | last post by:
Hi all! I am a beginner to C++ DotNet and I would like to ask what "Symbols not loaded" means and how to solve this problem. Thank you very much. Gernot
0
7099
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
6964
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7123
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
6842
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
5430
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
4559
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3069
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3070
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
598
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.