Computing.Net > Forums > Programming > borland 5.5 C++ compiler

borland 5.5 C++ compiler

Reply to Message Icon

Original Message
Name: Eric
Date: November 6, 2002 at 14:56:59 Pacific
Subject: borland 5.5 C++ compiler
OS: xp
CPU/Ram: 933mgz/386pc133
Comment:

I downloaded the free 5.5 compiler "command line tools" from Borland. I couldn't get it to install from the read me instructions. does anyone know how to actually set it up with the L and I paths. I am very green at this and can't seem to even get that far. I found out there is a fix it .exe that is supposed to help and I use it and it looks like it did what it was supposed to, but I still can't get it to run porperly. I click on the .exe for the compiler and it flashes a dos screen for a split second and is gone.
Any help would be great!


Report Offensive Message For Removal

Response Number 1
Name: Don Arnett
Date: November 6, 2002 at 19:05:19 Pacific
Subject: borland 5.5 C++ compiler
Reply: (edit)

Have not used the software that you are talking about, but when you say that you click on the .exe and it flashes a dos screen, do you mean that you are trying to compile and run a program that you wrote?

What you described happens when you run a console (or DOS) program that outputs to the screen and doesn't stop for any input (like Hello World!). If that is the case, you need to put in a gets() or something to make the program stop for input, so that the screen stays up long enough so that you can read it.


Report Offensive Follow Up For Removal

Response Number 2
Name: Jim
Date: November 6, 2002 at 21:20:15 Pacific
Subject: borland 5.5 C++ compiler
Reply: (edit)

If you're not using an integrated development environment, you'll have to use command line parameters. Clicking on the .exe is just going to print out the usage message, because the program didn't get any command line parameters.

Try opening a DOS box and invoking the compiler from the command line. You should probably also give it the name of the file you want to compile, along with any other compiler switches.

Or, you could make a batch file. Unless you're an extremely careful programmer, you'll be running that compiler a lot of times for each program you write. If there are a lot of compiler options, it is a pain to keep typing them in each time you do another build. It's also a pain for the linker if there are a lot of paths for libraries and whatnot. If it's a large program with many source files, you'll want to use a make program of some sort. For small programs, you can use a simple batch file that runs the compiler and then the linker. Your batch file can include a pause at the end, so you can check up on any errors.


Report Offensive Follow Up For Removal

Response Number 3
Name: JD
Date: November 7, 2002 at 09:25:59 Pacific
Subject: borland 5.5 C++ compiler
Reply: (edit)

It's been a while since I set mine up. Running the intitial installation file should go through the process of asking you where you want to install the program, telling you it was unpacked when done. Note the drive and folder you choose to install to. I installed to "G:\Borland" to keep C: clean but that's just me -- and it created a "BCC55" folder under that.

In the BCC55 folder is a file called "Readme.txt" which you can read (or should be able to on most Windows PCs) by clicking on. It includes configuration info.

On my PC I added to my "autoexec.bat" file the command:

PATH = G:\Borland\Bcc55;G:\Borland\Bcc55\Bin

Which (at least under windows NT and 95) tells the operating system where the compiler ".exe" are. Pay attention to the fact that I installed mine on my "G" drive.

As the read-me says, in the BIN folder under BCC55 I created the "iLink32.cfg" file by right clicking, making a new text file and renaming it. If your computer does not pull ".cfg" files up into notepad/wordpad when you double click on them, just change the extension to .txt to edit it. When done editing, change it back to .cfg.

Mine reads (there is flexibility in options - don't think these are what you absolutely have to have):


-L"G:\Borland\Bcc55\lib"
/aa
/Tpe

The first parameter pointing to the drive ("G") and folder I installed in.

As the readme says, I created a "Bcc32.cfg" file, also, by creating a new text document and renaming. It reads:

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

Again, I installed it in "G" so my paths start with G; if you install in "C" you'd start with "C".

Once I was done, it works for me. I use batch files as other people suggest, to do my compiling. Created by making a new text document by right clicking in the folder and changing the extension to be .bat. (using the "Edit" command from a right-click on the file to edit it). My typical batch file is:

bcc32.exe -5 -W -a4 "Main C Source.cpp" > error.txt

Note that I use a pipe (">") to output the TEXT of the result (the error messages) to a file I prefer to call "error.txt" to see what went wrong and where (I always mess up five times before I get it right). The ">" only redirects the compiler warning and error messages - once I solve all my errors the actual executable pops out in the folder - in the above case it'd appear as "Main C Source.exe".

Once the path and configuration files are set, I can compile anywhere I want to.

As far as switches and such, you'll have to look them up (the above compiler switches are for windows executable, pentium instructions, 4 byte alignment - in general).

I've been able to use the compiler quiet a bit for playing around - although some things aren't perfect under NT.

Barring misspellings and rushing before I think, that's how I set mine up for Windows NT and Windows 95/98.


Report Offensive Follow Up For Removal







Use following form to reply to current message:

   Name: From My Computing.Net Settings
 E-Mail: From My Computing.Net Settings

Subject: borland 5.5 C++ compiler

Comments:

 


  Homepage URL (*): 
Homepage Title (*): 
         Image URL: 
 
Data Recovery Software