Borland problem.

This is a discussion on Borland problem. within the C++ Programming forums, part of the General Programming Boards category; Hi ive just installed borland 5.5(commandlinetools) and i have created the .cfg file and the ilink file both in the ...

  1. #1
    Registered User
    Join Date
    Jun 2012
    Posts
    4

    Borland problem.

    Hi ive just installed borland 5.5(commandlinetools) and i have created the .cfg file and the ilink file both in the bin file. Ive changed the path to include c:\Borland\BCC55\bin and when i open the command prompt and type bcc32 i get all the functions in a list. I then wrote a simple Hello world type program in notepad++ and saved it as sample.cpp in the bin file of borland. so i type in at the command prompt bcc32 sample.cpp to compile it and i get the error E2194 - cannot find file sample.cpp. Its really infuriating cos im probably doing something basically wrong bur i cant see it. Should i write the code in the normal windows notepad instead of notepad++ or do i have to change the autoexec. bat file? Any help would be much appreciated. Cheers.

  2. #2
    and the hat of wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,337
    > I then wrote a simple Hello world type program in notepad++ and saved it as sample.cpp in the bin file of borland
    Don't save it there!
    You don't want to pollute the compiler installation with your random hacking.

    Create a new directory, say "code" within your own personal "Documents and Settings".

    > so i type in at the command prompt bcc32 sample.cpp to compile it and i get the error E2194 - cannot find file sample.cpp
    You need to "cd" to the directory where the source file is saved.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

  3. #3
    Registered User
    Join Date
    Jun 2012
    Posts
    4
    I think ive sorted it, i have to type in cd c:\Borland\BCC55\Bin into the command prompt and then complie it using bcc32 etc. Its annoying cos i thought changing the path in environment variables meant that i wouldnt have to type in the whole file location.

  4. #4
    Registered User
    Join Date
    Oct 2006
    Posts
    2,144
    Quote Originally Posted by Jpg123 View Post
    Hi ive just installed borland 5.5
    that was your first mistake.

  5. #5
    Internet Superhero
    Join Date
    Sep 2006
    Location
    Denmark
    Posts
    934
    Quote Originally Posted by Jpg123 View Post
    I think ive sorted it, i have to type in cd c:\Borland\BCC55\Bin into the command prompt and then complie it using bcc32 etc. Its annoying cos i thought changing the path in environment variables meant that i wouldnt have to type in the whole file location.
    If you added "C:\Borland\BCC55\Bin" to your PATH, then you shouldn't have to type the command to run the compiler. You just need to change the directory to where your .cpp file is located, and then run the compiler. Judging from your original post, it seems you've placed your source/.cpp file in your compiler directory, which would explain why you have to cd to C:\Borland\BCC55\Bin to be able to compile.

    Placing various source files in your compilers bin directory is a _very_ poor idea, especially since this folder is part of your PATH.
    How I need a drink, alcoholic in nature, after the heavy lectures involving quantum mechanics.

  6. #6
    Registered User
    Join Date
    Jun 2012
    Posts
    4
    Quote Originally Posted by Elkvis View Post
    that was your first mistake.
    Yeah i keep getting told that, im going to use it for a bit and then move on

  7. #7
    Internet Superhero
    Join Date
    Sep 2006
    Location
    Denmark
    Posts
    934
    Quote Originally Posted by Jpg123 View Post
    Yeah i keep getting told that, im going to use it for a bit and then move on
    Why?

    (Perfect place for a car analogy)
    Would you also learn to drive in a Model T and then work your way up from there?

    Go download MingW, it's a free, open-source compiler for Windows. It's just as easy to use as Borland, but unlike Borland it isn't A MILLION years old.
    How I need a drink, alcoholic in nature, after the heavy lectures involving quantum mechanics.

  8. #8
    Registered User
    Join Date
    Jun 2012
    Posts
    4
    yeah i will do that i think, one more question though. If i place a .cpp file into my general documents file and then just type in the name at the command line it runs fine. Does it compile instantaneously so there would be no need to type bcc32? When i type bcc32 (filename), i get the above error.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Memory problem with Borland C 3.1
    By abobokaa in forum C Programming
    Replies: 1
    Last Post: 02-22-2011, 10:53 AM
  2. Borland Problem.
    By dimirpaw in forum C++ Programming
    Replies: 4
    Last Post: 11-26-2005, 07:05 PM
  3. Problem with Borland 5.5
    By Gregthatsme in forum C++ Programming
    Replies: 2
    Last Post: 05-25-2003, 08:07 AM
  4. borland c++ problem
    By datainjector in forum C++ Programming
    Replies: 4
    Last Post: 09-08-2002, 11:19 PM
  5. Borland Complier Problem
    By slx47 in forum C++ Programming
    Replies: 5
    Last Post: 05-10-2002, 02:15 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21