Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

TSE: How to compile C / C++ programs from within TSE using Embarcadero Borland 32 bits command line compiler version 10.2?

27 views
Skip to first unread message

knud van eeden

unread,
Feb 3, 2025, 5:00:04 PMFeb 3
to SemWare TSE Pro Text Editor
FYI:

1. Compiler settings:

--- cut here: begin --------------------------------------------------

Extension=.c
Description=C: Knud [Embarcadero Borland bcc 10.2]
Command=COMCPPBCC102.BAT &name& &ext& &fn& &drive& &path& &output&
Output=Don't Clear Screen or Prompt After Shell
 -Error={^.#}:{[0-9]#}:{[0-9]#}: {warning}|{error}|{fatal error}: {.#$}
  Error: Options=i
  Error: Extra line (default empty line)=
 -FileName=
  FileName: Options=
  FileName: Tag=1
 -Line=
  Line: Options=
  Line: Tag=2
 -Column=
  Column: Options=
  Column: Tag=3
 -Message=
  Message: Options=
  Message: Tag=0
User Macro=

--- cut here: end ----------------------------------------------------

2. Create this batch file COMCPPBCC102.BAT and put it in your working TSE directory (all 1-liners)
(you will have to adapt the drive and the paths,
similar for C++, just create a new compiler entry
but change the 'extension=C++' 
and use the same .BAT file)

---

--- cut here: begin --------------------------------------------------

@REM version 1.0.0.0.1

@REM [kn, ri, mo, 03-02-2025 18:57:19]

g:

cd \language\computer\cpp\embarcadero\borland\bcc102\bin\

del g:\language\computer\cpp\embarcadero\borland\bcc102\bin\%1.exe

@ECHO filename=%3 >%6

g:\language\computer\cpp\embarcadero\borland\bcc102\bin\bcc32c.exe -Ig:\language\computer\cpp\embarcadero\borland\bcc102\include -Lg:\language\computer\cpp\embarcadero\borland\bcc102\lib %3 >>%6 2>&1

@ECHO.

COPY "%6" c:\temp\dddoutput.txt

@ECHO.

copy g:\language\computer\cpp\embarcadero\borland\bcc102\bin\%1.exe %4:\%5\

@ECHO.

@PAUSE

g:

cd \language\computer\cpp\embarcadero\borland\bcc102\bin\

del g:\language\computer\cpp\embarcadero\borland\bcc102\bin\%1.exe

@ECHO filename=%3 >%6

g:\language\computer\cpp\embarcadero\borland\bcc102\bin\bcc32c.exe -Ig:\language\computer\cpp\embarcadero\borland\bcc102\include -Lg:\language\computer\cpp\embarcadero\borland\bcc102\lib %3 >>%6 2>&1

@ECHO.

COPY "%6" c:\temp\dddoutput.txt

@ECHO.

copy g:\language\computer\cpp\embarcadero\borland\bcc102\bin\%1.exe %4:\%5\

@ECHO.

@PAUSE

--- cut here: end ----------------------------------------------------

---

3. Load a C program into TSE

4. Choose this compiler from the list of compilers.

5. Run the compiler.

6. As usual you will see the error output (if any) in the lowest TSE window.

7. Tested successfully in TSE version 4.50 RC24

Inline image


with friendly greetings
Knud van Eeden


knud van eeden

unread,
Feb 3, 2025, 5:09:28 PMFeb 3
to SemWare TSE Pro Text Editor
FYI:

1. Compiler settings:

--- cut here: begin --------------------------------------------------

Extension=.c
Description=C: Knud [Embarcadero Borland bcc 5.5]
Command=COMCPPBCC55.BAT &name& &ext& &fn& &drive& &path& &output&
Output=Don't Clear Screen or Prompt After Shell
 -Error=^{Warning}|{Error}|{Fatal} {W|E|F}[0-9]* #{.*} {[0-9]#}: {.@}$\c
  Error: Options=i
  Error: Extra line (default empty line)=
 -FileName=
  FileName: Options=
  FileName: Tag=5
 -Line=
  Line: Options=
  Line: Tag=6
 -Column=
  Column: Options=
  Column: Tag=
 -Message=
  Message: Options=
  Message: Tag=0
User Macro=

--- cut here: end ----------------------------------------------------

2. Create this batch file COMCPPBCC55.BAT and put it in your working TSE directory (all 1-liners)
(you will have to adapt the drive and the paths,
similar for C++, just create a new compiler entry
but change the 'extension=C++'
and use the same .BAT file)

---

--- cut here: begin --------------------------------------------------

@REM version 1.0.0.0.4

@REM [kn, ri, sa, 28-01-2023 18:11:38]-[kn, ri, fr, 08-12-2023 17:14:48]-[kn, ri, tu, 19-11-2024 23:12:34]

g:

cd \language\computer\cpp\embarcadero\borland\bcc55\bin\

del g:\language\computer\cpp\embarcadero\borland\bcc55\bin\%1.exe

@ECHO filename=%3 >%6

g:\language\computer\cpp\embarcadero\borland\bcc55\bin\bcc32.exe -Ig:\language\computer\cpp\embarcadero\borland\bcc55\include -Lg:\language\computer\cpp\embarcadero\borland\bcc55\lib %3 >>%6 2>&1

@ECHO.

COPY "%6" c:\temp\dddoutput.txt

@ECHO.

copy g:\language\computer\cpp\embarcadero\borland\bcc55\bin\%1.exe %4:\%5\

@ECHO.

@PAUSE

g:

cd \language\computer\cpp\embarcadero\borland\bcc55\bin\

del g:\language\computer\cpp\embarcadero\borland\bcc55\bin\%1.exe

@ECHO filename=%3 >%6

g:\language\computer\cpp\embarcadero\borland\bcc55\bin\bcc32.exe -Ig:\language\computer\cpp\embarcadero\borland\bcc55\include -Lg:\language\computer\cpp\embarcadero\borland\bcc55\lib %3 >>%6 2>&1

@ECHO.

COPY "%6" c:\temp\dddoutput.txt

@ECHO.

copy g:\language\computer\cpp\embarcadero\borland\bcc55\bin\%1.exe %4:\%5\

knud van eeden

unread,
Feb 3, 2025, 5:53:57 PMFeb 3
to SemWare TSE Pro Text Editor
FYI:

1. Compiler settings:

--- cut here: begin --------------------------------------------------

Extension=.c
Description=C: Knud [GNU MingW gcc 64 bits]
Command=COMCPPMINGWGCC64.BAT &name& &ext& &fn& &drive& &path& &output&
Output=Tee Output, Run Hidden and Don't Prompt After Shell
 -Error={^.#}:{[0-9]#}:{[0-9]#}: {warning}|{error}|{fatal error}: {.#$}
  Error: Options=i
  Error: Extra line (default empty line)=
 -FileName=
  FileName: Options=
  FileName: Tag=1
 -Line=
  Line: Options=
  Line: Tag=2
 -Column=
  Column: Options=
  Column: Tag=3
 -Message=
  Message: Options=
  Message: Tag=0
User Macro=

--- cut here: end ----------------------------------------------------

2. Create this batch file COMCPPMINGWGCC64.BAT and put it in your working TSE directory (all 1-liners)
(you will have to adapt the drive and the paths,
similar for C++, just create a new compiler entry
but change the 'extension=C++'
and use the same .BAT file)

---

--- cut here: begin --------------------------------------------------

@REM version 1.0.0.0.0
@REM [kn, ri, mo, 03-02-2025 23:32:24]
del %4:\%5\%1.exe
@ECHO filename=%3 >%6
g:
cd \language\computer\cpp\mingw\mingw64\bin\
gcc.exe %3 -o %4:\%5\%1 >>%6 2>&1
@ECHO.
COPY "%6" c:\temp\dddoutput.txt
@ECHO.
@PAUSE
del %4:\%5\%1.exe
@ECHO filename=%3 >%6
g:
cd \language\computer\cpp\mingw\mingw64\bin\
gcc.exe %3 -o %4:\%5\%1 >>%6 2>&1
@ECHO.
COPY "%6" c:\temp\dddoutput.txt
@ECHO.

knud van eeden

unread,
Feb 3, 2025, 6:05:47 PMFeb 3
to SemWare TSE Pro Text Editor
FYI:

1. Compiler settings:

--- cut here: begin --------------------------------------------------

Extension=.c
Description=C: Knud [Cygwin GNU gcc 32 bits]
Command=COMCPPCYGWINGCC32.BAT &name& &ext& &fn& &drive& &path& &output&
Output=Tee Output, Run Hidden and Don't Prompt After Shell
 -Error={^.#}:{[0-9]#}:{[0-9]#}: {warning}|{error}|{fatal error}: {.#$}
  Error: Options=i
  Error: Extra line (default empty line)=
 -FileName=
  FileName: Options=
  FileName: Tag=1
 -Line=
  Line: Options=
  Line: Tag=2
 -Column=
  Column: Options=
  Column: Tag=3
 -Message=
  Message: Options=
  Message: Tag=0
User Macro=

--- cut here: end ----------------------------------------------------

2. Create this batch file COMCPPCYGWINGCC32.BAT put it in your working TSE directory (all 1-liners)
(you will have to adapt the drive and the paths,
similar for C++, just create a new compiler entry
but change the 'extension=C++'
and use the same .BAT file)

---

--- cut here: begin --------------------------------------------------

@REM version 1.0.0.0.0
@REM [kn, ri, mo, 03-02-2025 23:59:34]
del %4:\%5\%1.exe
@ECHO filename=%3 >%6
g:
g:\cygwin\bin\
gcc.exe %3 -o %4:\%5\%1 >>%6 2>&1
@ECHO.
COPY "%6" c:\temp\dddoutput.txt
@ECHO.
@PAUSE
del %4:\%5\%1.exe
@ECHO filename=%3 >%6
g:
g:\cygwin\bin\

knud van eeden

unread,
Feb 3, 2025, 8:53:36 PMFeb 3
to SemWare TSE Pro Text Editor
FYI:

Download this Watcom version 2.0 here (you will have to give permission to install it to Microsoft Windows Defender)

1. Compiler settings:

--- cut here: begin --------------------------------------------------

Extension=.c
Description=C: Knud [Watcom 32-bit C Compiler]
Command=COMCPPWATCOM32.BAT &name& &ext& &fn& &drive& &path& &output&
Output=Tee Output and Don't Prompt After Shell
 -Error=^{.*}({[0-9]#}): {Warning}|{Error}!.*$
  Error: Options=
  Error: Extra line (default empty line)=
 -FileName=
  FileName: Options=
  FileName: Tag=1
 -Line=
  Line: Options=
  Line: Tag=2
 -Column=
  Column: Options=
  Column: Tag=
 -Message=
  Message: Options=
  Message: Tag=0
User Macro=


--- cut here: end ----------------------------------------------------

2. Create this batch file COMCPPWATCOM32.BAT and put it in your working TSE directory (all 1-liners)
(you will have to adapt the drive and the paths,
similar for C++, just create a new compiler entry
but change the 'extension=C++'
and use the same .BAT file)

---

--- cut here: begin --------------------------------------------------

@REM version 1.0.0.0.2
@REM [kn, ri, tu, 04-02-2025 02:20:34]-[kn, ri, tu, 04-02-2025 02:41:32]-[kn, ri, tu, 04-02-2025 02:46:01]
@REM
@REM Set up Watcom environment
SET WATCOM=g:\language\computer\cpp\watcom
SET INCLUDE=%WATCOM%\h;%WATCOM%\h\nt
SET LIB=%WATCOM%\lib386;%WATCOM%\lib386\nt
del %WATCOM%\binnt64\%1.exe
@ECHO filename=%3 >%6
REM Compile with explicit include path
g:
cd %WATCOM%\binnt64\
wcl386.exe -fe=%4:\%5\%1.exe -i"%WATCOM%\h" -l"%WATCOM%\lib386\nt" %3 >>%6 2>&1
@ECHO.
COPY "%6" c:\temp\dddoutput.txt
@ECHO.
@PAUSE
del %WATCOM%\binnt64\%1.exe
@ECHO filename=%3 >%6
REM Compile with explicit include path
g:
cd %WATCOM%\binnt64\
wcl386.exe -fe=%4:\%5\%1.exe -i"%WATCOM%\h" -l"%WATCOM%\lib386\nt" %3 >>%6 2>&1

knud van eeden

unread,
Feb 3, 2025, 9:10:43 PMFeb 3
to SemWare TSE Pro Text Editor
The previous information was to compile C files.
This version compiles C++ files:


FYI:

Download this Watcom version 2.0 here (you will have to give permission to install it to Microsoft Windows Defender)

1. Compiler settings:

--- cut here: begin --------------------------------------------------

Extension=.cpp
Description=C++: Knud [Watcom 32-bit Compiler]
Command=COMCPPWATCOMCPP32.BAT &name& &ext& &fn& &drive& &path& &output&
Output=Tee Output and Don't Prompt After Shell
 -Error=^{.*}({[0-9]#}): {Warning}|{Error}!.*$
  Error: Options=
  Error: Extra line (default empty line)=
 -FileName=
  FileName: Options=
  FileName: Tag=1
 -Line=
  Line: Options=
  Line: Tag=2
 -Column=
  Column: Options=
  Column: Tag=
 -Message=
  Message: Options=
  Message: Tag=0
User Macro=


--- cut here: end ----------------------------------------------------

2. Create this batch file COMCPPWATCOMCPP32.BAT and put it in your working TSE directory (all 1-liners)
(you will have to adapt the drive and the paths,
similar for C++, just create a new compiler entry
but change the 'extension=C++'
and use the same .BAT file)

---

--- cut here: begin --------------------------------------------------

@REM version 1.0.0.0.0
@REM [kn, ri, tu, 04-02-2025 03:02:07]
@REM
@REM Set up Watcom environment
SET WATCOM=g:\language\computer\cpp\watcom
SET INCLUDE=%WATCOM%\h;%WATCOM%\h\nt;%WATCOM%\h\nt\c++
SET LIB=%WATCOM%\lib386;%WATCOM%\lib386\nt;%WATCOM%\lib386\nt\cpp
del %WATCOM%\binnt64\%1.exe
@ECHO filename=%3 >%6
REM Compile with explicit include path
g:
cd %WATCOM%\binnt64\
wcl386.exe -bt=nt -fe=%4:\%5\%1.exe -i"%WATCOM%\h" -l"%WATCOM%\lib386\nt" %3 >>%6 2>&1
@ECHO.
COPY "%6" c:\temp\dddoutput.txt
@ECHO.
@PAUSE
del %WATCOM%\binnt64\%1.exe
@ECHO filename=%3 >%6
REM Compile with explicit include path
g:
cd %WATCOM%\binnt64\
wcl386.exe -bt=nt -fe=%4:\%5\%1.exe -i"%WATCOM%\h" -l"%WATCOM%\lib386\nt" %3 >>%6 2>&1
@ECHO.
COPY "%6" c:\temp\dddoutput.txt
@ECHO.
@PAUSE

--- cut here: end ----------------------------------------------------

---

3. Load a C++ program into TSE

knud van eeden

unread,
Feb 4, 2025, 6:52:35 AMFeb 4
to SemWare TSE Pro Text Editor
FYI:

1. Compiler settings:

--- cut here: begin --------------------------------------------------

Extension=.c
fDescription=C: Knud: MicroSoft Visual Studio Compiler 32
Command=COMCPPMICROSOFTCL32.BAT &name& &ext& &fn& &drive& &path& &output&
Output=Tee Output, Run Hidden and Don't Prompt After Shell
 -Error=^{.*}({[0-9]#}) *:.*{{error}|{warning}.*}$
  Error: Options=
  Error: Extra line (default empty line)=
 -FileName=
  FileName: Options=
  FileName: Tag=1
 -Line=
  Line: Options=
  Line: Tag=2
 -Column=
  Column: Options=
  Column: Tag=
 -Message=
  Message: Options=
  Message: Tag=3
User Macro=

--- cut here: end ----------------------------------------------------

2. Create this batch file COMCPPMICROSOFTCL32.BAT and put it in your working TSE directory (all 1-liners)

---

--- cut here: begin --------------------------------------------------

@REM version 1.0.0.0.1
@REM [kn, ri, mo, 03-02-2025 20:30:56]-[kn, ri, tu, 04-02-2025 12:41:24]

del %4:\%5\%1.exe

CD %4:\%5
CALL "C:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Auxiliary\Build\vcvars32.bat"
"C:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Tools\MSVC\14.42.34433\bin\Hostx86\x86\cl.exe" /Fe%4:\%5\%1.exe %3 >>%6 2>&1

@ECHO.
COPY "%6" c:\temp\dddoutput.txt
@ECHO.

CD %4:\%5

@ECHO filename=%3 >%6
"C:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Tools\MSVC\14.42.34433\bin\Hostx86\x86\cl.exe" /Fe%4:\%5\%1.exe %3 >>%6 2>&1

@ECHO.
COPY "%6" c:\temp\dddoutput.txt
@ECHO.
@PAUSE

--- cut here: end ----------------------------------------------------

---

3. Load a C program into TSE
(similar for C++, just create a new compiler entry with extension 'C++' and the same .BAT file)
Reply all
Reply to author
Forward
0 new messages