Link to home
Start Free TrialLog in
Avatar of soodsandeep
soodsandeepFlag for India

asked on

a question about c / C++ IDE.

hello experts, i have a general question about c / c++, in Compile Menu Bar it has options like Complie, Make, Link And build all.
Please tell me how does these four diffier. Especially what is difference between make and build all.
Waiting...
Thanks.
Sandeep.
Avatar of skypalae
skypalae

Hi,
I don't know which IDE you use, but this should be similar to all environments i know. There should be also one more item called 'Clean'. And now, what they do.

Compile: compiles your source making .obj (or .o on UNIX) files, one for each source file. It usually compiles new/changed sources only.
Link: Links all the .obj files together to make one .exe (also links resource files and some more).
Clean: Deletes all the .obj files from your project folder (can delete some more temporary files).
Make: Usually does Compile, Link.
Build all: Usually does Clean, Make.

S.
Avatar of sunnycoder
there are various stages of what we commonly refer to as compilation
first the source is put through a preprocessor to get processed source code
next it is converted to assembly code ( not necessary)
next it is converted to object code ... this is compiled code which can be loaded in to memory .. only problem being that it includes/calls some libraries and ofcourse we have not written/compiled code for the libraries with it ... so we need to link it to the library ... thus next step is linking

linking basically inserts addresses/calls for these library routines in the object code so that while executing, we know where to find the routine
futher reference
http://www.magma.ca/~louievb/gcc/gcc_tutorial.html
gcc.gnu.org

make is a tool/utility which is widely used for larger projects ... it selectively compiles only those files of a project which have changed since last compilation and their dependent source files ... this eliminates the overhead of having to recompile entire project for a small change in a single file. Build all generally refers to a command for "making" all the "targets" or executables in a project.
http://www.gnu.org/manual/make-3.79.1/html_chapter/make_toc.html
Avatar of soodsandeep

ASKER

hi, thanks for your quick replies.
Experts, i am using TCC.
Thanks.
Sandeep.
You need any further clarifications Sandeep ?
yes, sunnycoder ! Please help me little more. i am working in Turbo C++. Its IDE has these options : Compile, Make, Build All, Link.
Please tell me the difference in these.
ASKER CERTIFIED SOLUTION
Avatar of sunnycoder
sunnycoder
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial