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

  • Home
  • SEARCH
  • 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 8308403
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T18:48:11+00:00 2026-06-08T18:48:11+00:00

I have a large number of includes in my C program. During development I

  • 0

I have a large number of includes in my C program. During development I experimented with different ways of doing things so I bet there a number of libraries that I have included but are not used.

Does the compiler get rid of libraries that are not used? Is there a tool that can tell me? Even if the compiler does get rid of the code, it would tidy up the source if I can get rid of some things.

  • 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-08T18:48:17+00:00Added an answer on June 8, 2026 at 6:48 pm

    It’s not actually the compiler that decides whats finally goes into the executable, but the linker. Modern linkers are smart enough not not pull in code from a library unless the code is used. So you can link to hundreds of libraries, but if you don’t call any functions in them then they wont add any code to your program.

    As for the header files, most doesn’t contain anything more than declarations and pre-processor macros, and those won’t add code by themselves. The biggest drawback with including many header files is that it will slow down compilation of the source file.

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

Sidebar

Related Questions

We have a large number of programmers on different platforms all using CVS. We
I have a Entity model that includes a large number of lookup entities. All
I have a number of large data files that I included in projects attributed
I have a large number of records (10,000, increasing every day) that essentially is
I have a large number of documents (mainly PDFs) that I want to index
I have a large number of csv files that look like this below: xxxxxxxx
I have a large number of instances of a C structure like this: struct
I have a large number of C# WCF services that are being called by
I have a large number of background reads and writes, and a much smaller
We have a large number of data in many categories with many properties, e.g.

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.