PDA

Click to See Complete Forum and Search --> : Why compile in visual c++?


TTAYO
September 10th, 2004, 11:23 PM
Hi there,

I have started to write c and c++ programs using the visual c++ IDE, although I have no idea why visual c++ offers users the ability to build and/or compile a piece of code, when building the code in-order to debug the code creates an executable in the Debug folder. :confused:

I am fairly sure that there must be a reason for offering users the ability to compile and/or build a piece of code, and not just offering the build operation. Therefore if anyone could inform me as to the use of having both operations available in this IDE I would be grateful.

Thanx in advance,
L8R, TTAYO

hiddeninclouds
September 11th, 2004, 12:46 AM
If I understand your question correctly you are asking why the software creates chunks of compiled code in addition to the full exe's it can create?

This allows you to create reusable code. An example would be a class def. for a security layer object. When the object is created it's constructor accepts information about the systems database location and login info. Then your system calls functions in the security object for login, authencation, ect..

You can also build projects with different sections written in different languages.

TTAYO
September 11th, 2004, 10:40 PM
No, I don't mean that visual c++ creates reusable code, such as header files or functions.

When you use visual c++, to debug code you have to "build" the code first and this creates and executable in the Debug folder. In addition to the build option the user of this IDE also has the option the compile the code to create and executable.

Therefore my question is, when using visual c++, what does the compile operation do that the build operation does not?

hiddeninclouds
September 13th, 2004, 04:23 AM
Sorry for misunderstanding you :)
this link might help you out
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vccore98/HTML/_core_overviews.3a_.compiling_and_linking.asp