Thread: FAQ: Please help to use Borland Compiler

  1. #1
    Registered User
    Join Date
    Dec 2002
    Posts
    2

    FAQ: Please help to use Borland Compiler

    I have no idea. I down load Borland Compiler, opened freecomandlinetools.exe. It created C:\Borland\Bcc55, with bin, lib, include....subfolders. Followed instruction to creat file bcc32.cfg with 2 lines .....This is where I lost.

    . 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"

    Please tell me step-by-step how to create the bcc32.cfg file and add those line in. I trully appreciate very much, and forgive my stupidity.

  2. #2
    Code Goddess Prelude's Avatar
    Join Date
    Sep 2001
    Posts
    9,897
    >Please tell me step-by-step how to create the bcc32.cfg file and add those line in.
    Right click in an unoccupied space and select new->Text document. Open the new document and paste those lines in, then save as "bcc32.cfg".

    -Prelude
    My best code is written with the delete key.

  3. #3
    Registered User
    Join Date
    Dec 2002
    Posts
    2
    I used notepad to write these lines

    I"C:\BORLAND\BCC55\INCLUDE"
    L"C:\BORLAND\BCC55\LIB"
    and save as c:\borland\bcc55\bcc32.cgf

    repeat same for the line
    -L"C:\BORLAND\BCC55\LIB"
    and save as c:\borland\bcc55\ilink.cfg

    what wrong did I do and what else I get to do.

    Thanks in advance for your help

  4. #4
    End Of Line Hammer's Avatar
    Join Date
    Apr 2002
    Posts
    6,231
    The contents of my config files:

    First bcc32.cfg
    Code:
    -I"d:\Borland\Bcc55\include"
    -L"d:\Borland\Bcc55\lib"
    -wall
    and now ilink32.cfg
    Code:
    -L"d:\Borland\Bcc55\lib"
    Alternatively:
    http://community.borland.com/article...,21205,00.html

    Are you getting any errors?


    Also, this is not C++, I'm moving it to the tech board.
    When all else fails, read the instructions.
    If you're posting code, use code tags: [code] /* insert code here */ [/code]

  5. #5
    Registered User jawwadalam's Avatar
    Join Date
    May 2002
    Posts
    131
    Originally posted by rollingbroak
    I used notepad to write these lines

    I"C:\BORLAND\BCC55\INCLUDE"
    L"C:\BORLAND\BCC55\LIB"
    and save as c:\borland\bcc55\bcc32.cgf

    repeat same for the line
    -L"C:\BORLAND\BCC55\LIB"
    and save as c:\borland\bcc55\ilink.cfg

    what wrong did I do and what else I get to do.

    Thanks in advance for your help
    You must save this files in the \bin folder..

    as if you have use the default installation path of Borland C++ 5.5 which is C:\BORLAND\BCC55\ then the path of files bcc32.cfg and ilink.cfg should be as follows respectively..

    c:\borland\bcc55\bin\bcc32.cgf
    c:\borland\bcc55\bin\ilink.cfg

    .. Hope this will solve your problem... One more thing.. why dont You download the BloodShed's Dev-C++ free compilor..

    Enjoy Programming.....
    One day you will ask what more important to you..
    I will say my life..
    and You will leave me with even knowing
    that
    You are my Life (L)

  6. #6
    Registered User
    Join Date
    Jul 2002
    Posts
    161
    You also need to edit config.sys with notepad to include c:\Borland\Bcc55 to your dos command search path. (item a. on instuction list)

    There should be a line in config.sys that reads something like:

    set path=c:\;c:\windows

    It probably won't be exactly like that, but it will definately start with:

    set path=

    Add the following to the end of the line and save changes:

    ;c:\Borland\Bcc55

    What the path variable is is a list of directories separated by semicolons that dos searchs for any command you enter at dos prompt.

  7. #7
    Microsoft. Who? MethodMan's Avatar
    Join Date
    Mar 2002
    Posts
    1,198
    You dont have to do what kevinalm suggested to get it to work. When you save the files using notepad you must ensure to put " " around the file name or else it will save the file as bcc32.cfg.txt

    That should be about your only problem, rest of the info is valid, and you should be on your way.
    -MethodMan-

    Your Move:Life is a game, Play it; Life is a challenge, Meet it; Life is an opportunity, capture it.

    Homepage: http://www.freewebs.com/andy_moog/home.html

  8. #8
    Registered User
    Join Date
    Jul 2002
    Posts
    161
    >>You dont have to do what kevinalm suggested to get it to work.

    Are you sure? I'll take your word for it as I don't use Borland myself. But from the instructions rollingbroak quoted in his original post it looks like this is needed. I know something like this needs to be done for djgpp.
    Last edited by kevinalm; 12-25-2002 at 11:52 AM.

  9. #9
    Registered User jawwadalam's Avatar
    Join Date
    May 2002
    Posts
    131
    Originally posted by kevinalm
    >>You dont have to do what kevinalm suggested to get it to work.

    Are you sure? I'll take your word for it as I don't use Borland myself. But from the instructions rollingbroak quoted in his original post it looks like this is needed. I know something like this needs to be done for djgpp.
    kevinalm MethodMan is correct.. because I have used the compilor.. and the problem can only be is to save the file as .cfg ...as mentioned by MethodMan.
    One day you will ask what more important to you..
    I will say my life..
    and You will leave me with even knowing
    that
    You are my Life (L)

  10. #10
    End Of Line Hammer's Avatar
    Join Date
    Apr 2002
    Posts
    6,231
    Originally posted by kevinalm
    You also need to edit config.sys with notepad to include c:\Borland\Bcc55 to your dos command search path. (item a. on instuction list)
    Dont you mean the autoexec.bat file for setting the PATH variable:
    * If Windows 95/98:
    Navigate to the root in order to modify the PATH reference in the autoexec.bat file.
    3. Type "cd" [Enter]
    4. Type "edit autoexec.bat" [Enter]
    5. Insert a line and type "PATH=C:\BORLAND\BCC55\BIN;%PATH%"
    6. Save the changes (Alt-F then hit S).
    7. Exit edit. (Alt+F then press X).
    When all else fails, read the instructions.
    If you're posting code, use code tags: [code] /* insert code here */ [/code]

  11. #11
    erstwhile
    Join Date
    Jan 2002
    Posts
    2,227
    The information provided by Hammer is excellent and worth noting and applying.

    There is one other thing you should be aware of if you intend to compile win32 api programs on winNT/9x: you should add the following macro definitions to your bcc32.cfg file:
    Code:
    -DWINVER=0x0400
    -D_WIN32_WINNT=0x0400
    This is because the cmd line tools are setup for win2k by default. While your programs may compile ok without these macro definitions you will find that occasionally your programs will not run as expected. An example of this occurs when using common dialogs; the common dialog you are attempting to invoke will not appear under win9x unless you have defined these macros.

    You may also wish to include the path to the psdk files in both configuration files if you intend to code with win32 api.

    Example bcc32.cfg file for winNT/9x
    Code:
    -DWINVER=0x0400
    -D_WIN32_WINNT=0x0400
    -I"c:\Borland\Bcc55\include"
    -L"c:\Borland\Bcc55\lib;c:\Borland\Bcc55\lib\psdk"
    Example bcc32.cfg file for win2k/xp
    Code:
    -I"c:\Borland\Bcc55\include"
    -L"c:\Borland\Bcc55\lib;c:\Borland\Bcc55\lib\psdk"
    Example ilink.cfg file for all windows os
    Code:
    -L"c:\Borland\Bcc55\lib;c:\Borland\Bcc55\lib\psdk"
    Remember to save the two configuration files (bcc32.cfg, ilink32.cfg) in the bin directory of your Borland command line tools installation. Also remember to change the paths in these configuration files to that of your actual command line tools installation, if necessary.
    CProgramming FAQ
    Caution: this person may be a carrier of the misinformation virus.

  12. #12
    Registered User
    Join Date
    Jul 2002
    Posts
    161
    Hammer,
    Sometime around msdos 6.x config.sys and autoexec.bat became much more forgiving about what is done where. Autoexec.bat is where it should technically go, but in my experience more systems have the set path statement in config.sys. I should have mentioned the existing set path statement might be in either autoexec.bat or config.sys, or that it is possible there isn't any existing path. (not a particularly good thing)
    Last edited by kevinalm; 12-25-2002 at 11:04 PM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Wiki FAQ
    By dwks in forum A Brief History of Cprogramming.com
    Replies: 192
    Last Post: 04-29-2008, 01:17 PM
  2. FAQ Check/Lock
    By RoD in forum A Brief History of Cprogramming.com
    Replies: 2
    Last Post: 10-15-2002, 11:21 AM
  3. FAQ - it is not a true list of FAQ
    By alpha561 in forum C Programming
    Replies: 1
    Last Post: 05-25-2002, 06:40 PM