Entry
TSE: Language: Compile: C++: How to compile free Borland C++ command line compiler v5.5 in TSE?
Sep 29th, 2003 04:38
Knud van Eeden,
----------------------------------------------------------------------
--- Knud van Eeden --- 19 February 2002 - 10:39 pm -------------------
TSE: Language: Compile: C++: How to compile free Borland C++ command
line compiler v5.5 in TSE?
1. make sure you have the free Borland C++ compiler 'bcc32.exe'
installed
(so that e.g. this executable 'bcc32.exe' can be found on your
computer)
---
2. create a batchfile 'comcpp.bat', containing this text
(adapt it to your system) and store this batchfile in your TSE
directory)
(e.g. save to: 'c:\mytsedirectory\comcpp.bat')
---
@REM the following all on one line:
c:\borland\bcc55\bin\bcc32.exe -Ic:\borland\bcc55\include -
Lc:\borland\bcc55\lib %3
@IF errorlevel=1 GOTO fail
CLS
%1.exe
@GOTO end
:fail
@ECHO.
@ECHO.
@ECHO.
@ECHO There where errors found while compiling your program.
@ECHO.
@ECHO Could not compile to .exe...
@ECHO.
@ECHO.
:end
@PAUSE
@EXIT
---
3. Adapt the TSE compiler macro information:
(in TSE, after loading any file, press <SHIFT><F9>
then 'D' for debug compiler setup
then <ALT><C> to *copy* one of the compiler settings present
(so make sure you do not overwrite your old c++ compiler settings
present)
then change the fields:
'Extension' to: .cpp
'Description' to: C++ free command line compiler
'Command' to: c:\mytsedirectory\comcpp.bat &name& &ext& &fn& >
&output&
make sure this information is permanently stored in the compiler
information (via <ENTER>, then <ESCAPE>)
---
4. To make sure you compile with this free Borland command line
compiler (e.g. for testing purposes), choose the first time
1. <SHIFT><F9>
2. select 'compiler from 'L'ist.'
After that, the free Borland command line compiler will become the
default C++ compiler.
---
5. If you now load a .cpp file, fill in some program code for C++,
for example type or copy this text in a file 'mytest.cpp'
#include <iostream.h>
void main( void );
void main() {
cout << "Hello World from C++\n";
}
save that text in your TSE directory,
then press <CTRL><F9> or <ESCAPE><M><C> to compile, this will run
that
batch file, which includes the lib and include files files,
and runs the output, if correctly compiled.
---
6. That will show a typical output screen like this:
+------------------------------------------------------------+
|c:\wordproc\tse32_v40025>c:\borland\bcc55\bin\bcc32.exe |
|-Ic:\borland\bcc55\include |
|-Lc:\borland\bcc55\lib |
|c:\TEMP\mytest.cpp |
| |
|Borland C++ 5.5.1 for Win32 Copyright (c) 1993, 2000 Borland|
| |
|c:\TEMP\mytest.cpp: |
| |
|Turbo Incremental Link 5.60 Copyright (c) 1997-2002 Borland |
| |
|c:\wordproc\tse32_v40025>mytest.exe |
| |
| Hello World from C++ |
| |
|Press any key to continue . . . |
+------------------------------------------------------------+
---
---
Tested on TSE v4.x, and worked OK.
[kn, ni, mo, 29-09-2003 13:33:38]
---
---
Internet: see also:
C++: Borland: Compiler: Command: Line: Install: How to install free
Borland command line compiler?
http://www.faqts.com/knowledge_base/view.phtml/aid/24923/fid/163
Computer: Wordprocessor: TSE: Language: Computer: Compile: Run:
Overview
http://www.faqts.com/knowledge_base/view.phtml/aid/24311/fid/895
----------------------------------------------------------------------