Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9124593
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T06:36:26+00:00 2026-06-17T06:36:26+00:00

I have an argument with another developer, I’d like to settle here over Dynamic

  • 0

I have an argument with another developer, I’d like to settle here over Dynamic Link vs. Static Link.

In Theory:

Say you have a library with 100 functions, each has significant amounts of code inside it:

int A()
int B()
int C()
..
..and so on...

And your application only calls or depends on one of them.

You have two methods at your disposal.

  1. Build the library as a dynamic linked library
  2. Build the library as a statically linked library

My colleague claims that linking the static library to our application, the compiler/linker will not add the code of the 99 unused functions into our executable. I claim it will. I claim in this scenario the only advantage is having a single executable and not having to distribute the library with our application, but it will not have significant size differences if we used a dynamically linked library approach.

Who is correct?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T06:36:27+00:00Added an answer on June 17, 2026 at 6:36 am

    It depends 🙂

    If you put each function in its own source file, or use the /Gy compile option, each function will be packaged in a separate section of the static library.

    The linker will then be able to pick them up as needed, and only include the functions that are actually called.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a mocked object that is passed as a constructor argument to another
Is it possible to have an argument parser like this? import argparse parser.add_argument('query2target.bam', help='A
I have my markup like this (for argument's sake) <div id=content></div> <div id=layout></div> <div
I wish to have have the following String !cmd 45 90 An argument Another
I would like to pass a function as a template argument to another function
Sometimes I have to run multiple queries (one after another) with slightly different arguments
Can function argument have hint in cfscript (CF9)? CFML style: <cffunction name=myFunc output=false returntype=void>
I have created a file argument.pl which takes several arguments first of which should
I have a function whose input argument can either be an element or a
I have recently found out that no argument constructor and multiple argument constructor cannnot

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.