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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T08:48:23+00:00 2026-06-10T08:48:23+00:00

The problem Information on how linking works in detail are scarce. Also IDEs hide

  • 0

The problem

Information on how linking works in detail are scarce. Also IDEs hide the details of compilation which is a real pain when you have some linking related problem with your project.

Usually C++ books tell me that

C++ code --> preprocessed c++ code --> object code

But they really do not go into too much detail on what an average developer should know about linking despite the fact, that linking errors are common. How should a fresh C++ programmer know how to tackle an error like the following?

XmlRpcSocket.o:XmlRpcSocket.cpp:(.text+0x48b): undefined reference to `WSAGetLastError@0'

But this question is not specifically about this problem (-lwsock32 solves it). The problem is the lack of general knowledge about linking. My university C++ lecturer talked about linking for the time of one slide with a few black-boxes on it.

Also, resources on how linking works are scarce and most of the people I know still considers linking as a black-box operation. What I have learned about linking is through experimentation, and kinda “picked it up along the way”, but the problem with this approach is that it raises more questions than it answers.

For example: I know .LIB files are library files which are bundles of object files.
Now, how should one build and use a .LIB file? When is it desirable to use .LIB file? When sould I build static .LIB files or ones that reference DLLs? When I link a .LIB file with my object files do everything gets copied in, or just the object files I use? When should I build DLLs/so files instead of linking statically? Do I have to learn about the inner structure of object files to solve common problems? What do I have to know about name-mangling? When is it relevant? Can I link several different standard libraries with my project if one of the dlls load the old msvcrt? etc.

The question

Obviously I don’t expect an answer to all the above listed questions in one go. I just need to know where to start. Is there a resource like “What Every Programmer Should Know About Memory”, which talks about linking? So, I need resources to learn from and your insight on which direction should I go to learn about the linking process.

What are the things every developer should know about linking?

  • 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-10T08:48:25+00:00Added an answer on June 10, 2026 at 8:48 am

    There are TONS of resources.

    I guess that might be overwhelming for a “beginner” 😉

    As far as “Windows”, you could do worse than to start here:

    • Windows Architecture Overview

    • Beginner’s Guide to Linkers

    I’d also recommend this:

    • Programming from the Ground Up

    ‘Hope that helps 🙂

    PS:

    As clarification:

    • You want to know how the bits you’ve “compiled” (into machine code) all come together by “linking”. A totally fair question 🙂

    • It also helps to know a bit about how that machine code relates to a “running program”…

    • … and how a “running program” uses some bits from the (static) .exe, and other bits from the dynamic runtime (.dll’s, or “dynamically linked libraries).

    • All of these details are often completely platform- and OS-specific

    • Hence the (varied) links.

    Again, I hope all that helps with your initial question.

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

Sidebar

Related Questions

I am working with MyFaces/Primefaces and I have a problem to get information using
I have got very big problem because I would like to get more information
EDIT: I have realized the source of my problem. I only have count information
I have a problem with retrieving information from a XML tree. My XML has
I am having problem saving additional information about each user automatically when a new
This is more for information then a problem. (On searching Stack Overflow I found
Rather odd problem in that I cannot use the data variable (the information returned
Im trying to get some system information using WMI but the problem is when
i`ve got a little problem with LINQ. I read out some information via XML-RPC.
I am using a framework to get information from the network. The problem is

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.