Setting up a compiler?

Started by
0 comments, last by neXt 22 years, 5 months ago
By now everyone would have realised I am the newest of newbies with no idea on what I am doing, so please have patience with me. -_-;;; I downloaded a compiler but it seems to be a whole bunch of folders. The instructions make no sense what so ever to me. So if anyone could explain what this means for me: 1. Run freecommandlinetools.exe; choose the drive and folder into which you want to install the free C++Builder 5 command line tool development system. 2. From the bin directory of your installation: a. Add "c:\Borland\Bcc55" to the existing path b. Create a bcc32.cfg file which will set the compiler options for the Include and Lib paths (-I and -L switches to compiler) by adding these lines: -I"c:\Borland\Bcc55\include" -L"c:\Borland\Bcc55\lib" c. Create an ilink32.cfg file which will set the linker option for the Lib path by adding this line: -L"c:\Borland\Bcc55\lib" Thank you in advance.
Advertisement
1. Double-click on the file you downloaded, "freecommandlinetools.exe" (I'll assume for the rest of this that you installed into the default directory).

2. Use notepad to edit the file "c:\autoexec.bat". Add the following line:

SET PATH=%PATH%;C:\BORLAND\BCC55\BIN;

I know the readme said to use "c:\borland\bcc55", but it's easier to go straight to \bin.

Save the file.

3. Start a new file in notepad and type the following lines:

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

Save this file as "c:\Borland\Bcc55\bin\bcc32.cfg".

4. Create another new file in notepad and type the following:

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

Save this file as "c:\Borland\Bcc55\bin\ilink32.cfg".

5. Restart your computer so the changes you made to autoexec.bat take effect.

6. Test the compiler. Use notepad again to create a new file. Type the following:



#include <stdio.h>

int main (void)
{
printf ("Hello World!\n");
return 1;
}



Save this file as "hello.c" (place in whatever directory you like). Now, open an MS-DOS prompt and cd to the folder where you saved "hello.c". On the command line, type:

bcc32 hello.c

If the compiler works right you should have two new files in the directory with "hello.c": "hello.obj" and "hello.exe". When you run "hello.exe" it should print the following:

Hello World!

Hope that helps.

Edited by - RabidOcelot on October 31, 2001 5:38:48 PM

Edited by - RabidOcelot on October 31, 2001 5:44:00 PM

This topic is closed to new replies.

Advertisement