Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old December 26th, 2005, 06:25 AM
meendar
Guest
 
Posts: n/a
Default Static and dynamic library

can anyone tell me what the static and dynamic library?

thnkx in advance.

  #2  
Old December 26th, 2005, 06:45 AM
W Marsh
Guest
 
Posts: n/a
Default Re: Static and dynamic library

meendar wrote:[color=blue]
> can anyone tell me what the static and dynamic library?
>
> thnkx in advance.
>[/color]

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.
  #3  
Old December 26th, 2005, 06:55 AM
meendar
Guest
 
Posts: n/a
Default Re: Static and dynamic library

thanks for your help.
but in an interview i was asked, how can we use static and dynamic
library in c++?

  #4  
Old December 26th, 2005, 06:55 AM
W Marsh
Guest
 
Posts: n/a
Default Re: Static and dynamic library

meendar wrote:[color=blue]
> thanks for your help.
> but in an interview i was asked, how can we use static and dynamic
> library in c++?
>[/color]

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.
  #5  
Old December 26th, 2005, 08:55 AM
Jim Langston
Guest
 
Posts: n/a
Default Re: Static and dynamic library

"meendar" <askjavaprogrammers@gmail.com> wrote in message
news:1135579363.751410.53810@o13g2000cwo.googlegro ups.com...[color=blue]
> thanks for your help.
> but in an interview i was asked, how can we use static and dynamic
> library in c++?[/color]

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.


  #6  
Old December 26th, 2005, 06:35 PM
Dave
Guest
 
Posts: n/a
Default Re: Static and dynamic library

meendar wrote:[color=blue]
> thanks for your help.
> but in an interview i was asked, how can we use static and dynamic
> library in c++?
>[/color]
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)
 

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles