CrazyEngineers
Howdy guest!
Dear guest, you must be logged-in to participate on CrazyEngineers. We would love to have you as a member of our community. Consider creating an account or login.
Replies
  • gaurav.bhorkar

    MemberFeb 14, 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.
    Are you sure? This action cannot be undone.
    Cancel
  • Morningdot Hablu

    MemberFeb 15, 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.
    .
    😒
    Are you sure? This action cannot be undone.
    Cancel
  • gaurav.bhorkar

    MemberFeb 15, 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.
    Are you sure? This action cannot be undone.
    Cancel
  • sushant005

    MemberFeb 15, 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.😁
    Are you sure? This action cannot be undone.
    Cancel
  • gaurav.bhorkar

    MemberFeb 15, 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.
    Are you sure? This action cannot be undone.
    Cancel
  • simanchal010

    MemberFeb 16, 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.😔😕
    Are you sure? This action cannot be undone.
    Cancel
  • gaurav.bhorkar

    MemberFeb 16, 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)?
    Are you sure? This action cannot be undone.
    Cancel
  • sherya mathur

    MemberFeb 16, 2010

    In <a href="https://en.wikipedia.org/wiki/Computer_science" target="_blank" rel="nofollow noopener noreferrer">Computer Science</a>, source code (commonly just source or code) is any collection of statements or declarations written in some <a href="https://en.wikipedia.org/wiki/Human-readable" target="_blank" rel="nofollow noopener noreferrer">Human Readable</a> computer <a href="https://en.wikipedia.org/wiki/Programming_language" target="_blank" rel="nofollow noopener noreferrer">Programming Language</a>. Source code is the mechanism most often used by <a href="https://en.wikipedia.org/wiki/Programmer" target="_blank" rel="nofollow noopener noreferrer">Programmer</a> to specify the actions to be performed by a computer.
    The source code which constitutes a <a href="https://en.wikipedia.org/wiki/Computer_program" target="_blank" rel="nofollow noopener noreferrer">Computer program - Wikipedia</a> is usually held in one or more <a href="https://en.wikipedia.org/wiki/Text_file" target="_blank" rel="nofollow noopener noreferrer">Text File</a>, sometimes stored in databases as <a href="https://en.wikipedia.org/wiki/Stored_procedure" target="_blank" rel="nofollow noopener noreferrer">Stored Procedure</a> and may also appear as <a href="https://en.wikipedia.org/wiki/Code_snippets" target="_blank" rel="nofollow noopener noreferrer">Code Snippets</a> printed in books or other media. A large collection of source code files may be organized into a <a href="https://en.wikipedia.org/wiki/Directory_%28file_systems%29" target="_blank" rel="nofollow noopener noreferrer">Directory %28File Systems%29</a>, 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 <a href="https://en.wikipedia.org/wiki/Executable" target="_blank" rel="nofollow noopener noreferrer">Executable</a> file by a <a href="https://en.wikipedia.org/wiki/Compiler" target="_blank" rel="nofollow noopener noreferrer">Compiler</a>, or executed <a href="https://en.wikipedia.org/wiki/On_the_fly" target="_blank" rel="nofollow noopener noreferrer">On The Fly</a> from the human readable form with the aid of an <a href="https://en.wikipedia.org/wiki/Interpreter_%28computing%29" target="_blank" rel="nofollow noopener noreferrer">Interpreter %28Computing%29</a>.
    The code base of a <a href="https://en.wikipedia.org/wiki/Programming" target="_blank" rel="nofollow noopener noreferrer">Programming</a> project is the larger collection of all the source code of all the <a href="https://en.wikipedia.org/wiki/Computer_program" target="_blank" rel="nofollow noopener noreferrer">Computer program - Wikipedia</a> which make up the project.
    Are you sure? This action cannot be undone.
    Cancel
  • gaurav.bhorkar

    MemberFeb 17, 2010

    @shreya mathur: We don't need copy-paste from other sources. Please mention the source if you copy.
    Are you sure? This action cannot be undone.
    Cancel
  • thechamp

    MemberFeb 27, 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
    Are you sure? This action cannot be undone.
    Cancel
  • anzilkasim

    MemberFeb 27, 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
    #-Link-Snipped-#
    Are you sure? This action cannot be undone.
    Cancel
  • thechamp

    MemberFeb 27, 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
    #-Link-Snipped-#
    that did not answer any of my query..
    Are you sure? This action cannot be undone.
    Cancel
  • Laurar468

    MemberFeb 28, 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
    #-Link-Snipped-#
    Are you sure? This action cannot be undone.
    Cancel
Home Channels Search Login Register