how a source code of a programe is being converted into object code
please give me detailed information about this topic.:wink:
Member • Feb 14, 2010
Member • Feb 15, 2010
hi gaurav,gaurav.bhorkarThe compiler just translates your source code according to the language rules.
- You write the source code.
- The compiler translates the your code into binary code (OBJ).
- The linker extracts the OBJ code from the standard library (for the std. lib. functions like printf you use.
- The linker links your code with the extracted code and forms the EXE.
Member • Feb 15, 2010
Ya assembler is used there. But that process comes under compilation.mohit007kumar00hi gaurav,
i think firstly high lable lang source code is converted into assembly source code by the help of compiler and then converted into .obj by using assembler .
.
please correct me if i m wrong.
.
😒
Member • Feb 15, 2010
Hi gaurav,gaurav.bhorkarThe compiler just translates your source code according to the language rules.
- You write the source code.
- The compiler translates the your code into binary code (OBJ).
- The linker extracts the OBJ code from the standard library (for the std. lib. functions like printf you use.
- The linker links your code with the extracted code and forms the EXE.
Member • Feb 15, 2010
Look, pre-processor is the first "place" where your source code goes to. The preprocessor converts it to the expanded source code and then sends it to the compiler......and so on.sushant005Hi gaurav,
I agree with u.
But tell me that in all this whole process is there any involvement of preprocessor.😁
Member • Feb 16, 2010
gaurav please elaborate the third point.....gaurav.bhorkarThe compiler just translates your source code according to the language rules.
- You write the source code.
- The compiler translates the your code into binary code (OBJ).
- The linker extracts the OBJ code from the standard library (for the std. lib. functions like printf you use.
- The linker links your code with the extracted code and forms the EXE.
Member • Feb 16, 2010
Lets take the C language,simanchal010gaurav please elaborate the third point.....
😕
okay gaurav u have complited within the 4 points.......but where is the work of loader?? actually i dont know that much all these topics are new for me.:sad:😕I haven't heard of a loader in a compiler.
Member • Feb 16, 2010
Member • Feb 17, 2010
Member • Feb 27, 2010
Member • Feb 27, 2010
Member • Feb 27, 2010
that did not answer any of my query..anzilkasimOnce you compile the C source program, the compiler covert this source program which has an extension *.c to *.obj, *.exe and *.bak
Using *.exe file we can run the program, and we can find the object code in *.obj and if any problem happens with the *.c file we can create a new one using the back up file (*.bak).
anzilkasim
#-Link-Snipped-#
Member • Feb 28, 2010