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 1 2337
"Torbak" <at*****@free.f r> wrote in message
news:f7******** *************** ***@posting.goo gle.com... 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 This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
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 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...
|
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 same interface (header) and thus the symbol names are identical.
In order to be able to link lib1.a and lib2.a with main.cpp I tried to
localize the duplicated symbols (with GNU objcopy) and partially linked a.o
with b1.o and a.o with b2.o. This...
|
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 against ObjectA ObjectB.
1. CC -I. -o example.bin example.cc ./libAB.a
this fails, on link error to std::list.
|
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 very funny. eScrew story is so funny that eScrew will have to
take break from time to time because eScrew needs some rest from
laughing. Oh boy, here it comes... eScrew funny laugh laughing
|
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, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
| |
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 setting.
They are in the same solution, and compile/link without problems (Debug
configuration).
I also have 1 mixed-mode CLR DLL that consumes both the static
libraries and managed DLLs. It is configured to use the /MDd C Runtime
library. When...
|
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 /home/seba/workspace2/rel15/newcall...(no
debugging symbols found)...done.
Using host libthread_db library "/lib/libthread_db.so.1".
|
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 protocols */
|
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
|
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
| |
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |