Solved

a question about c / C++ IDE.

Posted on 2003-12-01
6
394 Views
Last Modified: 2012-05-04
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.
0
Comment
Question by:soodsandeep
  • 3
  • 2
6 Comments
 
LVL 4

Expert Comment

by:skypalae
ID: 9856307
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.
0
 
LVL 45

Expert Comment

by:sunnycoder
ID: 9856373
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
0
 

Author Comment

by:soodsandeep
ID: 9856524
hi, thanks for your quick replies.
Experts, i am using TCC.
Thanks.
Sandeep.
0
Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 
LVL 45

Expert Comment

by:sunnycoder
ID: 9856535
You need any further clarifications Sandeep ?
0
 

Author Comment

by:soodsandeep
ID: 9856584
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.
0
 
LVL 45

Accepted Solution

by:
sunnycoder earned 50 total points
ID: 9856591
I just did !!!

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.

linking basically inserts addresses/calls for these library routines in the object code so that while executing, we know where to find the routine

I have also posted some links for further reference ... pls go through them
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Preface I don't like visual development tools that are supposed to write a program for me. Even if it is Xcode and I can use Interface Builder. Yes, it is a perfect tool and has helped me a lot, mainly, in the beginning, when my programs were small…
Summary: This tutorial covers some basics of pointer, pointer arithmetic and function pointer. What is a pointer: A pointer is a variable which holds an address. This address might be address of another variable/address of devices/address of fu…
The goal of this video is to provide viewers with basic examples to understand recursion in the C programming language.
The goal of this video is to provide viewers with basic examples to understand and use conditional statements in the C programming language.

706 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now