Blue Theme Orange Theme Green Theme Red Theme
 
Home | Forums | ASP.NET 2.0 Tutorials | Web Services | How Do I...? | Class Browser | WPF Quick Starts | Advertise with Us
 | Consulting  
Submit an Article Submit a Blog 
Search :       Advanced Search »
Home » Blogs Home » Blog Detail

How Exe file is Generated by VS2005 C++ Project?

 by Sivaraman Dhamodaran on Jan 17, 2012

This blog gives you the brief of how a exe file is created from the source code.
Comments: 0 Views: 853 Printable Version 

Let us consider a simple example. Say, you have exe project, and the project has three header files and three implementation files. After the coding done without any error, you build the project. The build project operation will create the exe output. Have a look at the below picture.

 

Pic01.JPG

 

When you build the project the following actions are taken by the development IDE (Say VS2005):

 

1)      The compiler conducts a pre-processing operation before doing its actual job of compilation. The processing is conducted on the source file; I mean the cpp files. This pre-processing replaces the macros to its content, #include header files, to its content etc.

2)      Once the above said operation is completed for the single file say a.cpp, the compiler starts compiling that file to generate the a.obj file. And this continues till all the cpp files on a specific project (Exe or dll or ocx; whatever it is) is converted to object file.

3)      Now linker comes into picture. The linker understands more robust and compact form of input that comes as object file for each compiler-processed cpp in the previous step. The linker combines all object files and generates the required binary say the exe file in our case.

 

If you we feed input to the compiler in the form of the cpp programming language and the linker actually generates the output binaries.

 

If your Solution workspace contains 57 projects with dependency properly set, the above said compilation and linking takes place for each project. When you build such big solution, just sit back and watch the output window. You will see for each project, the build operation displays cpp file processing and at the end the linker will generate the output. 

Comment Request!
Thank you for reading this post. Please post your feedback, question, or comments about this post Here.
 
What do you say about this post? Post a comment here
*Title:
*Comment:
 
Comments not available.
Team Foundation Server Hosting
Become a Sponsor

 Blogger's Profile
Age: Not Available
Location:
Title: Systems Engineer
Joined: Oct 21, 2010
Education: Masters Degree
 More Blogs from this Blogger
[Video] OnClose Handler
[Video] Storing and Loading the Window and Toolbar position
Swapping Exe Process
How Exe file is Generated by VS2005 C++ Project?
What is Exe
Header files: Multiple Inclusion problem - Solution B
Header files: Multiple Inclusion problem - Solution A
Header files: Multiple Inclusion problem - Reason
Header files: Multiple Inclusion problem
Header file inclusion techniques
View all »
 Latest Blogs
[Video] OnClose Handler
[Video] Storing and Loading the Window and Toolbar position
The Euclidean Algorithm
Swapping Exe Process
How Exe file is Generated by VS2005 C++ Project?
What is Exe
Header files: Multiple Inclusion problem - Solution B
Header files: Multiple Inclusion problem - Solution A
Header files: Multiple Inclusion problem - Reason
Header files: Multiple Inclusion problem
View all »
 Latest Jobs
More ... 
 Latest Interview Questions
More ... 

 © 2012  contents copyright of their authors. Rest everything copyright Mindcracker. All rights reserved.