Learning how to write C/C++ code is only the first step. To be a serious programmer, you need to understand the structure and purpose of the binary files produced by the object files, static libraries, shared libraries, and, of course, executables. Advanced C and C++ Compiling explains the build process in detail and shows how to integrate code from other developers in the form of deployed libraries as well as how to resolve issues and potential mismatches between your own and external code trees. With the proliferation of open source, understanding these issues is increasingly the responsibility of the individual programmer. Advanced C and C++ Compiling brings all of the information needed to move from intermediate to expert programmer together in one place -- an engineering guide on the topic of C/C++ binaries to help you get the most accurate and pertinent information in the quickest possible time. What you'll learn The details of the build process, including compiling and linking The inner workings of static libraries, shared libraries, and executables Ways to properly architect code for smooth integration of future changes Tips for troubleshooting problems with compiling and linking as well as run-time problems How to use operating system-specific (Linux and Windows) tools for analysis of binary files Who this book is forC/C++ software designers aspiring to senior levels, software architects, build engineers, and Linux system administrators.
This book is unique in its class. It covers in great detail all the intricacies and complexities of compiling, building, and deploying C/C++ applications, but teaching everything from the most fundamental command-line tools. You learn how to interact with the compiler and related tools to understand every phase of the process: preprocessing, compiling, and static and dynamic linking. You learn how to explore the intermediate and final binaries, how to disassemble code, and explore it to understand how things work under the hood or to troubleshoot issues in the code. Particularly the coverage of dynamic libraries was extensive and rich with useful details. This is the kind of book that you must read in front of a computer with a shell terminal open, ready to try and experiment with the ideas described in its pages. There are so many things I will need to sit down and read again to master its contents because some concepts were beyond my abilities at this point, but I'm really glad I have found this book. I have the feeling one must eventually master this material to be a true C/C++ hacker.
I've read this book to understand why Swift can't directly work with C++ code. When import pure C++ header into bridging header, a project complains at standard library. While Objc deals well with it.
This book describes C++: compiling, linking, loading, project memory map, static and dynamic libraries, contents of binary file, linux(objdump, ar, lsof, ldconfig) and windows toolbox for debugging and reverse engineering binaries.