Problem
Information on how links work is not enough. In addition, the IDE hides compilation details, which are a real pain when you have a problem linking to your project.
Usually C ++ books tell me that
C++ code --> preprocessed c++ code --> object code
But they really donโt go into too much detail about what the average developer should know about communication, even though communication errors are common. As a new C ++ programmer, he knows how to solve the error, for example the following:
XmlRpcSocket.o:XmlRpcSocket.cpp:(.text+0x48b): undefined reference to ` WSAGetLastError@0 '
But this question is not specific to this problem (-lwsock32 solves it). The problem is the lack of general knowledge of linking. My C ++ university lecturer talked about timing one slide with several black boxes on it.
In addition, resources for how links work are scarce, and most of the people I know still consider binding as a black box operation. What I learned about binding is an experiment, and it seems to have โlifted it in its path,โ but the problem with this approach is that it has more questions than answers.
For example: I know that .LIB files are library files that are packages of object files. Now, how to create and use a .LIB file? When is it advisable to use a .LIB file? When can I create static .LIB files or those that reference a DLL? When I link the .LIB file to my object files, is everything copied, or only the object files that I use? When do I need to create DLLs / so libraries instead of linking statically? Should I learn about the internal structure of object files to solve common problems? What should I know about imitation? When is this relevant? Is it possible to link several different standard libraries with my project if one of the DLL loads the old msvcrt? and etc.
Question
Obviously, I do not expect an answer to all of the above questions at once. I just need to know where to start. Is there a resource like โWhat Every Programmer Should Know About Memory,โ which talks about communication? So, I need resources to learn and understand which direction I should go in order to learn about the linking process.
What things should every developer know about binding?