[nfbcs] quiry regarding borland C++
Rejin Jose k.
m2rejin at gmail.com
Sun May 26 06:15:27 UTC 2013
hello friends,
ive installed borland C++ compiler and configured it correctly.but
while i checked the 'how to compile' part in the web site,i read like
this.i'm pasting that part below:
So, now that you are armed with all this information you are probably
wondering "How do I turn my source code into a program?" We will start
with the simplest
case of a single source file, console program. Here is the source code
of a file called simple.cpp that I wrote in the text editor, notepad:
#include
<stdio.h> int main(void) { printf("Output from running program");
return 0; }
To build this into a program we only need to call the compiler. However,
the compiler needs to know what source file to build and where to find
the header files and the library files. We pass these to the compiler
as command
line options as shown:
bcc32 -If:\Borland\bcc55\include -Lf:\Borland\bcc55\Lib simple.cpp
The resulting program is called simple.exe and can be run by typing
simple at the command-line.
Now, let's look at the case of a console program with two source
modules. simple.cpp will contain our entry point main and will call a
function defined
in the other module, funcs.cpp.
simple.cpp
#include "funcs.h" int main(void) { return PrintSomeOutput("Output
from running program"); } funcs.h #include <stdio.h> int
PrintSomeOutput(char*
output); and funcs.cpp #include <stdio.h> int PrintSomeOutput(char*
output) { printf(output); return 0; }
To build this, simply add funcs.cpp to
the previous compiler command-line as such:
bcc32 -If:\Borland\bcc55\include -Lf:\Borland\bcc55\Lib simple.cpp funcs.cpp
So what happens if you have a bunch of different include and library
directories. Or hundreds of source files. As you can imagine the
command-line for
this would be huge. You have two choices. Wrap up all of these
commands into a batch file or use a makefile. Makefiles are
prefferred.
-------
In the last paragraph they are saying about wrapping up of all files
into a batch file or using makefile to use compile command easily.I
dont know how to do this wrapping or makefile.So please guide
me,which would be better and how to make use of it.please give me step
by step instruction.
thanks in advance.
--
With Warm Regards,
Rejin Jose
email:m2rejin at gmail.com
cell:8281293699
Have a Great Day......
More information about the NFBCS
mailing list