How to compile and run program at the same time with BCC32 in SciTE?

B

Billy

Hi!

I'm using:
-Compiler: Borland Command Line C++ Compiler 5.5.1
-Code Editor: SciTE 1.75

Anybody know how we can in Scite with command Tools|Go (F5) compile
and run my c or cpp program at the same time? So I won't first compile
and then run, but all in one step.

I don't know how to set parameters in "cpp.properties" file. I know
that I have to set line "command.go.needs.*.c", but It doesn't work.
Please for help.

Is this possible from regular command line (cmd)?

Regards,
Billy
 
J

Jeff Schwab

Billy said:
Hi!

I'm using:
-Compiler: Borland Command Line C++ Compiler 5.5.1
-Code Editor: SciTE 1.75

Anybody know how we can in Scite with command Tools|Go (F5) compile
and run my c or cpp program at the same time? So I won't first compile
and then run, but all in one step.

I don't know how to set parameters in "cpp.properties" file. I know
that I have to set line "command.go.needs.*.c", but It doesn't work.
Please for help.

Is this possible from regular command line (cmd)?

I don't know SciTE at all, but doing this all in one step should be easy
enough from the command line. I don't remember the DOS syntax, but on
Unix/Linux/Mac you can use the && operator to run the program iff the
build is successful:

bcc32 -o main main.cc && ./main

You can replace the direct call of bcc32 with make, or tmake, or nmake,
or whichever build tool you prefer; Borland includes its own make.exe.
You can generally recall the previous command by pressing the up arrow
on your keyboard, and re-run it by hitting Enter.

Better yet, you can define a make target that includes the ordinary
build, then runs the resulting executable. For example, your makefile
may look like this:

run: main
./main
main:

I have a copy of 5.1 lying around here somewhere, but it's not
installed, so I can't check the Borland make syntax right now.
:(
 
J

John Brawley

"Jeff Schwab"
I don't know SciTE at all, but doing this all in one step should be easy
enough from the command line. I don't remember the DOS syntax, but on
Unix/Linux/Mac you can use the && operator to run the program iff the
build is successful:

bcc32 -o main main.cc && ./main

You can replace the direct call of bcc32 with make, or tmake, or nmake,
or whichever build tool you prefer; Borland includes its own make.exe.
You can generally recall the previous command by pressing the up arrow
on your keyboard, and re-run it by hitting Enter.

Better yet, you can define a make target that includes the ordinary
build, then runs the resulting executable. For example, your makefile
may look like this:

run: main
./main
main:

I have a copy of 5.1 lying around here somewhere, but it's not
installed, so I can't check the Borland make syntax right now.
:(

I'm willing to bet the OP doesn't want to leave ScITE.
I would not want to. I love it.
I use exactly the same setup he does, but I usually compile, then run in a
DOS box (me: console program only).
It's true that you can run the compiled program from within SciTE (outputs
show in the compiler/linker-messages window), but it doesn't always work as
you expect.
Just seems to me having to compile then run is a minor inconvenience?
 
J

Jeff Schwab

John said:
"Jeff Schwab"

I'm willing to bet the OP doesn't want to leave ScITE.

He specifically asked: "Is this possible from regular command line (cmd)?"
 
B

Billy

Thanks for answers guys.

I'm using SciTE on Windows only, and don't know how that work on
Linux. I have set SciTE that I can compile (Ctrl+F7) and Run (F5) from
there, separately. But for that I have to complete two operations and
I want integrate all in one command. I asked if I can do that somehow
over that setting line: "command.go.needs.*.c".
I meant if is possible to compile & run program with bcc32 somehow
from command line. If that will work then I could use that as "script"
for command in SciTE.

So now I created a batch file "bcc.bat" which contain just two lines:
bcc32 %1
%2

and I "glue" that to: command.build.*.c=x:\path\bcc.bat $(FileNameExt)
$(FileName)

That way I can now:
* Separately Compile (Ctrl+F7) and after that Run (F5) the program.
or
* Compile & Run at the same time (F7).

That way I actually create something similar like other IDE's have
like: MinGW Developer Studio:
* Compile (Ctrl+F7) + Execute (Ctrl+F5)
or
* Compile & Run at the same time (F8)

Anybody maybe know how to prepare/setup previous mentioned Borland
compiler with MinGW Developer Studio?

And why I am asking all that? I'm studying C & C++ and I looking for
some good free IDE that I can use with all compilers. Some books use
Borland "bcc32", some "gcc", some "cl" from MS. So I would like to use
some kind editor/IDE which work with any compiler and include
autocomplete, text sensitive help, debugging features, with simple
user interface, and so on and possibility to Compile and Run
separately or both with one command.

I find until now:
* MinGW Developer Studio
* SciTE
* Programmer's Notepad
* PSPad
* Bloodshed DEV C++

And each of that have something what other don't have. What is the
best? What to choose and then stick with it?

Regards,
Billy
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,981
Messages
2,570,187
Members
46,731
Latest member
MarcyGipso

Latest Threads

Top