473,513 Members | 2,469 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

What is "shared library" in C, is there any small example I can see?

Confusing th eword with "library", "shared library" and how to use
these things in real C project, is there any small example I can take a
look. Thanks.

Nov 15 '05 #1
2 2015
In article <11**********************@o13g2000cwo.googlegroups .com>,
<sa***********@yahoo.com> wrote:
Confusing th eword with "library", "shared library" and how to use
these things in real C project, is there any small example I can take a
look. Thanks.


The C language itself does not have "library" or "shared library"
or "project". The C standard requires that the implementation provide
a standard set of routines which it calls "the standard library",
but the C standard puts no restriction on how the implementation
does that.

It is -common- for implementations to provide ways of bundling
groups of half-compiled programs, and that those bundles can
be referenced by the linking phase in order to provide access
to the routines and data, but there is a fair variability in
how that is done.

A "shared library" (in common parlance) is just another
library (with system-dependant semantics and invocation
mechanisms). Again the C standard has nothing to say on
the matter.

When a system bothers to distinguish between a "library"
and a "shared library", it might commonly be saying that
only one copy of the "shared library" will be placed in memory
for access by all users and all processes, whereas a library
on such a system that was -not- "shared" would have a copy of
some or all of it placed into each process's address space.

Details of what a "library" or "shared libary" mean on your
system, and how to use them, should be asked about in a newsgroup
appropriate for your system. As I mentioned before, they are not
C concepts as such, and there are important differences between
different systems.
--
Chocolate is "more than a food but less than a drug" -- RJ Huxtable
Nov 15 '05 #2

<sa***********@yahoo.com> wrote
Confusing th eword with "library", "shared library" and how to use
these things in real C project, is there any small example I can take a
look. Thanks.

Most C implentations allow you to build "libraries" - compiled function
which can be called from user code. The standard library and extensions will
probably come with the compiler as "library" files.

On a big system, exactly what some of these libraries do can be complex. For
instance a sophisticated operating system won't want printf() writing pixels
directly to the screen, it will want facilities for capturing and
redirecting output, changing fonts, providing braile access for blind users,
and so. Also it doesn't make any sense to load a huge system for one "hello
world" program - better have all the code resident in memory.

Exactly what "shared library" menas can differ, however, as Walter pointed
out. It could mean a libary which more than one application links to, it
could mean a library of which only one copy is in memory at any one time, it
could mean a library like the braile printf example which several programs
access simulataneously in a cooperative manner.
Nov 15 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
3036
by: Berthold Hoellmann | last post by:
Hello, When I use ./configure --with-thread --with-fpectl --with-signal-module \ --with-pymalloc --enable-shared --with-cxx=g++ make test on 2.3.3 I get
5
5625
by: apple | last post by:
UDBV8 fp 6a - AIX 5.1 We have scheduled cron jobs to do backups. Periodically and starting to occur more frequently, a backup fails with this error: SQL2072N Unable to bind the shared library...
2
1616
by: Jenna Schmidt | last post by:
I know that one of the benefits of using "Shared" methods is you do not explicitly have to Dim as New object to access the method. Are there some other implications with memory and concurrency...
1
6766
by: David Sanschagrin | last post by:
(I previously posted this problem on vb.general.discussion but I've been told that this question is more related to VB.NET than VB6 and so that I should post that here.) I'm trying to call a...
7
7341
by: Carsten H. Pedersen | last post by:
Hello I want to create a kind of shared object. I have created a class, Counter, which you can then import. Through the Counter class, i would like to have access to a shared object. Lets say...
2
1548
by: HmFireBall | last post by:
Hi, This is a question about a shared property in ASP.NET Imagine there's an assembly called my.dll that is in the /bin directory of several websites. This assembly contains a class with a...
3
19232
by: Kenneth Kahl | last post by:
Hello, I would like to call a C++ programm out of Java with help of JNI. By the followed command I created a "shared library": g++ -shared -o libcalculate.so rechner.cpp When I create an...
3
2246
by: jbeteta | last post by:
Hello, I have a problem declaring variables. I need to create an object oRpte as ReportClass on WebForm1.aspx and be able to use its value on WebForm2.aspx. For declaring the property oRpte()...
3
2311
by: amit2781 | last post by:
I am trying to build the my project on HPUX (HP-UX oscar B.11.11 U 9000/800 741028561 unlimited-user license) which access the Mysql library. But it is giving error as : Error :...
0
7259
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
7158
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...
1
7098
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
5683
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
4745
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
3232
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
3221
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1592
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 ...
0
455
bsmnconsultancy
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...

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.