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 767185
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T17:10:15+00:00 2026-05-14T17:10:15+00:00

Yea this is a dumb question… However in both of my C++ classes we

  • 0

Yea this is a dumb question… However in both of my C++ classes we did not do this at all (except for native libraries: iostream, iomanip, etc.)… My question is can anyone provide a link that gives the general explanation of adding libraries to C++?

I do realize what what #include means; it’s just I have no clue on the linker/directories in a C++ IDE.

So long question short; could I get a general explanation of terms used to link libraries in C++?

I’m using c::b w/ MinGW.

  • 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-05-14T17:10:15+00:00Added an answer on May 14, 2026 at 5:10 pm

    This would probably interest you, but here is a short version:

    When you assemble the .cpp, .c or whatever files, each translation unit (that is, each file) generates an object file. When creating the final executable, you combine all the object files into a single binary. For static libraries, you compile the static archive (.a or .lib) along with all the object files into the binary itself. For linking to dynamic shared objects (.so or .dll), the binary is created with calls to the global offset table and you inform the linker that you wish to link with the shared object and the operating system loader builds the proper image when you run the program.

    A general explanation of terms used to link libraries in C++

    Starting with…

    translation – This is where the high-level code (in C, Fortran or whatever) is translated into assembly code by translation unit. So, every .cpp file is internally translated to assembly for a specific architecture.

    assemble – Generates object files from the generated assembly. Object files are almost machine code, but they have a lot of "unresolved externals," which you can kind of think of as pointers to actual function definitions.

    linking – This takes all your object files and puts them into a coherent binary, be it a dynamic shared object or an executable. You need to tell the linker where it should find all those unresolved externals from the previous stage or they will show up as errors here.

    Now the binary sits on disk, which is waits until…

    loader – The operating system loads a binary off of the disk, which contains all the information needed to build the program image. While the details are extremely platform specific, the loader is generally tasked with finding all the shared library references generated by the linker, loading those (recursively, since each DSO can have its own dependencies) and putting them into the memory space of the program.

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

Sidebar

Related Questions

Yea this might seem like a noob question, but how do you open .apk
Yea pretty much it. On windows xp sp3. This is what happens: jruby -S
XXX----Yep, its a Homework problem, but yea I'm stuck. Why doesn't this print out
This is a design question rather than a Java-specific question, but I'm designing it
@ref prototype.js I have seen this Prototype.js ajax syntax used everywhere. However I have
So yea, im working on a windows system and while this works locally, know
So I have this code (in http://localhost/index.html ): <input type=button value=Yea class=button /> with
This is a stupid question. The documentation says: To enable debugging using Guard Malloc,
This question is more like searching for best solution. I know how to do
Possible Duplicate: Storing Images in DB - Yea or Nay? To Do or Not

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.