where does the compiler present...

Ashokkumar01cbe

Broken In
i am using codeblocks for doing my c and c++ program , everybody knows that object code for a program is generated by complier .and that source code will vary depending upon the OS , for a same program. but my question is that is the compiler comes with the codeblocks software,or it is integrated to the OS..please tell me..
 

vickybat

I am the night...I am...
^^ Compiler is integrated with an IDE & not OS. Linux has an inbuilt GCC compiler though.

Codeblocks is an ide and compiler is integrated with it.
 

ico

Super Moderator
Staff member
i am using codeblocks for doing my c and c++ program , everybody knows that object code for a program is generated by complier .and that source code will vary depending upon the OS , for a same program. but my question is that is the compiler comes with the codeblocks software,or it is integrated to the OS..please tell me..

Download binary

When you download from here, you see two options for Windows.

codeblocks-10.05-setup.exe - this one is to be used if you have a compiler already installed.
codeblocks-10.05mingw-setup.exe - this one comes with the MiniGW compiler for Windows which is actually based on GCC.
 
OP
Ashokkumar01cbe

Ashokkumar01cbe

Broken In
Hi,
If a program named HECTIC when it is complied in windows ultimate installed with codeblocks, an object code is generated ,is the object code same when it is complied in MACINTOSH computer or different..:confused:
 

ico

Super Moderator
Staff member
Hi,
If a program named HECTIC when it is complied in windows ultimate installed with codeblocks, an object code is generated ,is the object code same when it is complied in MACINTOSH computer or different..:confused:
There are two steps.

Compiling and Linking - Cprogramming.com

You could assume that Object Code is same. But the Linker, (Linker is what creates the executable file), Linker output is different.
 
OP
Ashokkumar01cbe

Ashokkumar01cbe

Broken In
If a java program named digit is compiled and executed in a windows pc ,an class code is generated same as object code in c..is the class code is generated via compiler then in windows there is no complier is installed .how is it generated..... please explain me ......:confused:
 

Neo

.
Java compiler was installed with the JDK. The class code was generated via the Java compiler and not the IDE.
 

vickybat

I am the night...I am...
If a java program named digit is compiled and executed in a windows pc ,an class code is generated same as object code in c..is the class code is generated via compiler then in windows there is no complier is installed .how is it generated..... please explain me ......:confused:

When you compile the "digit" java code, the compiler generates a java bytecode. This bytecode is platform independent and needs a java virtual machine to run or something that can interpret the bytecode.
In java, we have java virtual machines or simply JVM which interprets the bytecode generated by compiler and JVM is compatible with a lots of devices from handhelds, systems, consumer electronic gadgets etc and any system running a JVM can read and run the bytecode generated.

So java bytecode is termed as platform independent and can run in any system that has a JVM.
 

shanthi

Broken In
when we compile a program,class file is generated and that is not in read mode in this case we use Java virtual Machine which is platform dependent that makes class file as independent platform and make sure it runs in different OS.Each browser will have JVM.
 
Top Bottom