cpp++builder 5.5 Help?

This is a discussion on cpp++builder 5.5 Help? within the C++ Programming forums, part of the General Programming Boards category; Hello, I'm a beginner, and trying to compile my first c++ program, hello.cpp: with the above compiler. From the command ...

  1. #1
    Registered User
    Join Date
    Jan 2002
    Posts
    34

    cpp++builder 5.5 Help?

    Hello, I'm a beginner, and trying to compile my
    first c++ program, hello.cpp: with the above
    compiler.

    From the command prompt c:\> c:\Bin\bcc32.exe hello.cpp
    I receive the following error messages:
    1.Error 2209 hello.cpp 3:Unable to open include file iostream.h
    2.Error 2451 hello.cpp 8:Undefined symbol 'cout' in function
    main ()
    3.Error 2451 hello.cpp 8:Undefined symbol 'endl' in function
    main ().

    Even using the -v switch to no avail.

    Can anyone help?

    Adock.

  2. #2
    Hamster without a wheel iain's Avatar
    Join Date
    Aug 2001
    Posts
    1,385
    all those errors will be resolved if you type

    #include <iostream.h>

    before the

    int main()
    or void main()
    -whichever u have
    Monday - what a way to spend a seventh of your life

  3. #3
    RWALT
    Guest

    Need to set your paths in autoexec.bat

    Enter these lines in AUTOEXEC.BAT file, and restart your computer. The compiler/linker will be able to find the include and lib files...

    path C:\WINDOWS;C:\WINDOWS\COMMAND;C:\BORLAND\BCC55\BIN
    set lib=c:\borland\bcc55\lib;c:\borland\bcc55\lib\psdk
    set include=c:\borland\bcc55\include

    RWALT

  4. #4
    Registered User
    Join Date
    Jan 2002
    Posts
    34

    cpp++Builder 5.5 help?

    To: R WALT,

    Do I type the "include" and "lib" path',
    in the Autoexce.Bat? Please advise.

    Adock.

  5. #5
    RWALT
    Guest
    You really don't have to set the path for invoking the compiler or linker, you can continue like you were, typing in at he prompt the full path (e.g. C:\Borland\Bcc55\bin\bcc32....).

    You should place the two "set" lines below whatever else is in your AUTOEXEC.BAT file, so the compiler and linker programs can find the .h and .lib files in the INCLUDE and LIB folders...

    After you make a change to AUTOEXEC.BAT, restart your computer so the changes will take effect.

  6. #6
    Unregistered
    Guest
    or put the PATH in a batch file if you don't want to add anything to your autoexec.bat

  7. #7
    Registered User
    Join Date
    Jan 2002
    Posts
    34

    cpp++ builder 5.5 Help?

    To:RWALT,

    I've tried your suggestions, but the problem
    remains the same. The new compile is issuing
    the same errors.

    Any more suggestions?

    Thanks,

    Adock.

  8. #8
    Registered User
    Join Date
    Jan 2002
    Posts
    34

    cpp++builder 5.5 Help?

    To: RWALT,

    I've solved the problem of the number three
    error(endl), by removing the statement completely
    from the program. My code is as follows:

    #include <iostream.h)

    int main (void)

    {

    cout <<"Hello";

    return 0;

    }

    Please keep the thread alive.

    Adock.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. includein cpp file in a cpp file
    By sawer in forum C++ Programming
    Replies: 7
    Last Post: 06-15-2006, 12:34 PM
  2. Replies: 2
    Last Post: 04-09-2006, 07:20 PM
  3. THE END - Borland C++ Builder, Delphi, J Builder?
    By Davros in forum A Brief History of Cprogramming.com
    Replies: 5
    Last Post: 02-28-2006, 10:23 PM
  4. Multiple Cpp Files
    By w4ck0z in forum C++ Programming
    Replies: 5
    Last Post: 11-14-2005, 01:41 PM
  5. Borland 5.5 compiler problem!
    By Mako11 in forum C++ Programming
    Replies: 2
    Last Post: 03-15-2005, 10:18 AM

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