473,219 Members | 2,053 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

Static and dynamic library

can anyone tell me what the static and dynamic library?

thnkx in advance.

Dec 26 '05 #1
5 1857
meendar wrote:
can anyone tell me what the static and dynamic library?

thnkx in advance.


This isn't really a C++ question and so isn't on-topic in this group,
but it's Christmas.

A static library is linked into the program itself. A dynamic library is
external, and loaded by the program when needed.
Dec 26 '05 #2
thanks for your help.
but in an interview i was asked, how can we use static and dynamic
library in c++?

Dec 26 '05 #3
meendar wrote:
thanks for your help.
but in an interview i was asked, how can we use static and dynamic
library in c++?


It's an issue that occurs often when using C++ to create applications,
but it's not an actual C++ language question. You may well be expected
to know how use both static and dynamic libraries at work, but it's not
relevant in this group.
Dec 26 '05 #4
"meendar" <as****************@gmail.com> wrote in message
news:11*********************@o13g2000cwo.googlegro ups.com...
thanks for your help.
but in an interview i was asked, how can we use static and dynamic
library in c++?


Try microsoft.public.vc.language for this question (even if you don't use
vc). They will be able to answer your Windows specific c++ questions.
Dec 26 '05 #5
meendar wrote:
thanks for your help.
but in an interview i was asked, how can we use static and dynamic
library in c++?

It would depend on the particular environment. I've built shared files
on a Sun before, where you need to use a particular flag when compiling
the object files, and another when linking them to make a library.

The main advantage with static libraries is that if the executable
program is is moved to another machine, it will not depend on the
library being installed, there. However, it has disadvantages too - the
program is bigger, takes up more memory if invoked several times and
updates to the library will not be reflected in the executable.

Overall, static libraries seem to be dying. Solaris 10 no longer ships
with static libraries.

You need to look at the particular documentation on your own C++
compiler and linker.

Sorry, must stop there, as otherwise I will get shot on what must be the
most unfriendly newsgroup I have ever come across.

--
Dave K

http://www.southminster-branch-line.org.uk/

Please note my email address changes periodically to avoid spam.
It is always of the form: month-year@domain. Hitting reply will work
for a couple of months only. Later set it manually. The month is
always written in 3 letters (e.g. Jan, not January etc)
Dec 26 '05 #6

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

Similar topics

3
by: iceColdFire | last post by:
Hi, Can someone highlight the difference between static library and bynamic library...and how do .lib and .dll files come up in the picture... Thanks, a.a.cpp++ :-)
1
by: Eduardo Suárez | last post by:
Hi, i have tried to understand how static variables work on a dynamic library, but there's a point i can't see. * Is the data segment (where static variables live, please confirm) copied for...
6
by: Andrew S. Giles | last post by:
Is it possible to bring in a static library (developed in C++) into a C# project/solution? Thanks in advance for any information. Andrew S. GIles
5
by: info | last post by:
Hi! Please be patient with a newbie... I use DevC++. I've found and compiled succefully various openGL examples. Before build the application, I link the project with static libs, like, in...
14
by: Shimon Sim | last post by:
I have a static variable defined something like this private static Dictionary<string, string> roles = new Dictionary<string,string>(); Can I safely assume that it will be live for the live of...
20
by: JohnQ | last post by:
The way I understand the startup of a C++ program is: A.) The stuff that happens before the entry point. B.) The stuff that happens between the entry point and the calling of main(). C.)...
4
by: sealo | last post by:
Hello, I have a test in VS2005 that static library A.lib use the dynamic library C.dll. Then a application App use the A.lib. App-->A.lib-->C.dll It works. But if I remove the C.dll, the app...
4
by: kukuta | last post by:
Hi I have static library that is created from VC++.Net, however, I would like to use it in Borland C++ and I do any ways but it is not successful. So I want to ask: by the way can I use static...
6
by: Even | last post by:
Hi all, As far as I know, relative address will be assigned by program at link time.Right? Ok, here we go. So if we use a static library, it will give the program an relative address(i mean...
0
by: VivesProcSPL | last post by:
Obviously, one of the original purposes of SQL is to make data query processing easy. The language uses many English-like terms and syntax in an effort to make it easy to learn, particularly for...
3
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 3 Jan 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). For other local times, please check World Time Buddy In...
0
by: jianzs | last post by:
Introduction Cloud-native applications are conventionally identified as those designed and nurtured on cloud infrastructure. Such applications, rooted in cloud technologies, skillfully benefit from...
0
by: mar23 | last post by:
Here's the situation. I have a form called frmDiceInventory with subform called subfrmDice. The subform's control source is linked to a query called qryDiceInventory. I've been trying to pick up the...
0
by: abbasky | last post by:
### Vandf component communication method one: data sharing ​ Vandf components can achieve data exchange through data sharing, state sharing, events, and other methods. Vandf's data exchange method...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: fareedcanada | last post by:
Hello I am trying to split number on their count. suppose i have 121314151617 (12cnt) then number should be split like 12,13,14,15,16,17 and if 11314151617 (11cnt) then should be split like...
0
by: stefan129 | last post by:
Hey forum members, I'm exploring options for SSL certificates for multiple domains. Has anyone had experience with multi-domain SSL certificates? Any recommendations on reliable providers or specific...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....

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.