CrazyEngineers Archive
Old, but evergreen and popular discussions on CrazyEngineers, presented to you in read-only mode.
@simanchal010 • 14 Feb, 2010
please tell me the way of conversion detail, from source code to object code of a programme.:wink:

please give me detailed information about this topic.:wink:
@gaurav.bhorkar • 14 Feb, 2010
  • 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.
The compiler just translates your source code according to the language rules.
@Morningdot Hablu • 15 Feb, 2010
gaurav.bhorkar
  • 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.
The compiler just translates your source code according to the language rules.
hi 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.
.
😒
@gaurav.bhorkar • 15 Feb, 2010
mohit007kumar00
hi 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.
.
😒
Ya assembler is used there. But that process comes under compilation.
@sushant005 • 15 Feb, 2010
gaurav.bhorkar
  • 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.
The compiler just translates your source code according to the language rules.
Hi gaurav,
I agree with u.
But tell me that in all this whole process is there any involvement of preprocessor.😁
@gaurav.bhorkar • 15 Feb, 2010
sushant005
Hi gaurav,
I agree with u.
But tell me that in all this whole process is there any involvement of preprocessor.😁
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.

Pre-processing, compiling, assembling are all together called as compilation (maybe because they are very related). Even linking is sometimes considered a part of compilation process.
@simanchal010 • 16 Feb, 2010
gaurav.bhorkar
  • 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.
The compiler just translates your source code according to the language rules.
gaurav 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.😔😕
@gaurav.bhorkar • 16 Feb, 2010
simanchal010
gaurav please elaborate the third point.....
😕
Lets take the C language,
THe standard library available with the compiler is always in binary format and not in source code format.
The declarations of the standard library functions are written in the header files. Declarations are just there for the compiler to cross-check whether you've passed the correct no. of arguments to a function.

So, whenever you use printf() in a C program, the linker searches for the printf object code in the std library, extracts it and puts it into your program's object code to make an exe (executable) file.

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.
Are you talking of the program loader (which is a component of OS)?
@sherya mathur • 17 Feb, 2010 In computer science, source code (commonly just source or code) is any collection of statements or declarations written in some human-readable computer programming language. Source code is the mechanism most often used by programmers to specify the actions to be performed by a computer.
The source code which constitutes a program is usually held in one or more text files, sometimes stored in databases as stored procedures and may also appear as code snippets printed in books or other media. A large collection of source code files may be organized into a directory tree, in which case it may also be known as a source tree.
A computer program's source code is the collection of files needed to convert from human-readable form to some kind of computer-executable form. The source code may be converted into an executable file by a compiler, or executed on the fly from the human readable form with the aid of an interpreter.
The code base of a programming project is the larger collection of all the source code of all the computer programs which make up the project.
@gaurav.bhorkar • 17 Feb, 2010 @shreya mathur: We don't need copy-paste from other sources. Please mention the source if you copy.
@thechamp • 28 Feb, 2010 if anyone can elaborate the role of interpreter(particularly and discretely) in compiling of a scource code in C++.
also, if someone has some experience in developing interpreter for C++, can tell me how do i proceed in developing one. and if there are some scope of improvement in presently available interpretrs which i can work upon.
thanks
@anzilkasim • 28 Feb, 2010 Once 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
Home | Global Software Technologies
@thechamp • 28 Feb, 2010
anzilkasim
Once 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
Home | Global Software Technologies
that did not answer any of my query..
@anzilkasim • 28 Feb, 2010 Object files are typically produced by a compiler as a result of processing a source code file. Object files contain compact code, and are often called "binaries". A linker is typically used to generate an executable or library by amalgamating parts of object files together. Object files for embedded systems typically contain nothing but machine code but generally, object files also contain data for use by the code at runtime: relocation information, stack unwinding information, comments, program symbols (names of variables and functions) for linking and/or debugging purposes, and other debugging information.

Anzil. K
Project Manager
Home | Global Software Technologies
4k views

Related Posts

@shweta borse · Apr 5, 2015

Is there is any medical and physical fitness test required for IES ECE 2015 if yes then what type of test is there.This year i submitted IES application form for...
3.5k views

@zaveri · Jul 19, 2012

Mass and weight may sound the same thing, but they aren't. while mass is a scalar, which only is the quantity of substance in a body, weight is actually a...
3.2k views

@safiajen0055 · Feb 11, 2013

Hello Guys, Me Safia & Want to do Robotics engineering in good college in India...Can you tell me which is the best engineering colleges in India for robotics??? Help me...
4.8k views

@Ankita Katdare · May 24, 2015

Timex is a leading brand in watches for over a century. The company has jumped on the bandwagon of wearable devices by introducing its own new smartwatch called 'Timex Ironman...
2.4k views

@Kaustubh Katdare · May 6, 2015

I'm looking to know if we can check which camera sensor is present in your smartphone? Are there any codes I can type in to know the exact information or...
1.4k views