How to put borland compiler in the tools menu?

General questions about using TextPad

Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard

Post Reply
Andreas Miller

How to put borland compiler in the tools menu?

Post by Andreas Miller »

Hi,

I've tried to put the borland 3.1 compiler into the tools menu.

I used the menu Configure/Preference then the entry Tools and Add/Program to enter the bcc-compiler.

The problem is now that the radiobuttons for Capture Output, Regular expression to match output and the Registers for File, Line are always grey. That means I cannot capture the output in a textpad window.

Is there somebody who could tell me, what I made wrong?

Thanks Andreas
Keith MacDonald

RE: How to put borland compiler in the tools menu?

Post by Keith MacDonald »

Hi Andreas,

Those controls are disabled for windows based programs, as it is only possible to capture the output of command line programs. I don't have the Borland 3.1 compiler to try, but version 5.5 works OK. You can download that from:

http://www.borland.com/bcppbuilder/freecompiler/

When adding it to TextPad's Tools menu, use the following
configuration:

Command: <full path to>\bcc32.exe
Parameters: -q $File
Initial Folder: $FileDir
Capture Output: checked
Regular Expression: ^\(Error\|Warning\) [^ ]+ \(.+\) \([0-9]+\):
File Register: 2
Line Register: 3

Note that there is a trailing space in the regular expression.


Keith MacDonald
Helios Software Solutions
Ed Scott

RE: How to put borland compiler in the tools menu?

Post by Ed Scott »

I added Bcc32.exe TextPad's Tools menu as you suggest. It seems to be working but I am getting a mess of error messages for functions not found for things like printf and fopen that are in the standard C libraries. How can I get the compiler to find these libraries?

Ed
Ed Scott

RE: How to put borland compiler in the tools menu?

Post by Ed Scott »

Oops! Pilot error - setting the right paths in Borland's .cfg files resolved the problem. Sorry for the unnecessary post.

This forum is going to be a useful addition to TextPad's site. Thanks.

Ed
Wim Mentink

RE: How to put borland compiler in the tools menu?

Post by Wim Mentink »

Ed Scott wrote:

Setting the right paths in Borland's .cfg files resolved the problem for unfound libraries.

Where dit Ed found the .cfg files for the Borland compiler 5.5
I was unable to find them.
Charlie

RE: How to put borland compiler in the tools menu?

Post by Charlie »

Hi There,

Can't remember where the help is for this ( Borlands web site probably) but just create a file text file containing these two lines, amending paths where necessary:

-I"c:\Borland\Bcc55\include"
-L"c:\Borland\Bcc55\lib"

Save it as bcc32.cfg in same folder as bcc32.exe

Create another text file ilink32.cfg, including this line in the text file. Again amending path to lib folder if necessary.

-L"c:\Borland\Bcc55\lib"

and hey presto, as they say. :)
Hope this helps.

Regards,

Charlie
Josh

RE: How to put borland compiler in the tools menu?

Post by Josh »

I have it compiling as need be, but how do I get it to actually run the program and capture the output?

Currently I have to run the .exe on my own, I can't launch it from TextPad.

Also, when debugging double clicking on erros in the command results won't take me to the line in the source code as it would when working in Java.

Any ideas on how to fix this?

Thank you for your time and help.
Post Reply