Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

neXt

Setting up a compiler?

This topic is 6081 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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.

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!