Questions on build and link
-
Dear all, I'm a junior developer writing mixed C/C++ based applications in Windows (using the VC++ command line tools, but not the DevStudio GUI). One of the question that I have the most trouble understanding is how does the build process really works. What is a precompiled header file? What's the difference between an .obj, a .dll, and a .lib file? How is an export table defined? How do a link all the .lib and .dll file together to make an executable? In many occasions it takes much more time finding out how to build and link properly than the actual coding part. I'm sure there are a lot more questions of this kind that are alluding junior developers everyday, since no good books are available and websites on the Internet (like CodeProject) rarely mentions anything on this subject. The MSDN website has a big chunk of reference manuals online about Compiling and Linking, but it offers almost little help for beginners who tries to learn this subject. Can anyone point me to some useful printed or Internet resources available? I'm hoping that someone in the CodeProject community can write an article on this subject too :) Thanks.
-
Dear all, I'm a junior developer writing mixed C/C++ based applications in Windows (using the VC++ command line tools, but not the DevStudio GUI). One of the question that I have the most trouble understanding is how does the build process really works. What is a precompiled header file? What's the difference between an .obj, a .dll, and a .lib file? How is an export table defined? How do a link all the .lib and .dll file together to make an executable? In many occasions it takes much more time finding out how to build and link properly than the actual coding part. I'm sure there are a lot more questions of this kind that are alluding junior developers everyday, since no good books are available and websites on the Internet (like CodeProject) rarely mentions anything on this subject. The MSDN website has a big chunk of reference manuals online about Compiling and Linking, but it offers almost little help for beginners who tries to learn this subject. Can anyone point me to some useful printed or Internet resources available? I'm hoping that someone in the CodeProject community can write an article on this subject too :) Thanks.
For a bit of a learning experience, try using the DevStudio GUI for a project and have a peek into the .DSP file (most of the commands for compile/link are there) or alternatively have the GUI export a makefile for you and inspect that one instead. It won't answer all your questions, but it should answer some of them. Chris