Error when compiling C files, on Borland

This is a discussion on Error when compiling C files, on Borland within the C Programming forums, part of the General Programming Boards category; can anyone explain this: C:\C Files\BACKUP>bcc32 -w- demo2.c Borland C++ 5.5.1 for Win32 Copyright (c) 1993, 2000 Borland demo2.c: Turbo ...

  1. #1
    Registered User
    Join Date
    Feb 2005
    Posts
    54

    Error when compiling C files, on Borland

    can anyone explain this:

    C:\C Files\BACKUP>bcc32 -w- demo2.c
    Borland C++ 5.5.1 for Win32 Copyright (c) 1993, 2000 Borland
    demo2.c:
    Turbo Incremental Link 5.00 Copyright (c) 1997, 2000 Borland
    Fatal: Expected an option: C:\Borland\Bcc55\lib

  2. #2
    Registered User
    Join Date
    Oct 2001
    Posts
    2,934
    >bcc32 -w- demo2.c
    I thought it was -W.
    bcc32 -W demo2.c

  3. #3
    Mad OnionKnight's Avatar
    Join Date
    Jan 2005
    Location
    Umeň, Sweden
    Posts
    555
    -w- removes warnings, -W compiles Windows programs so they're different.
    It looks like some sort of syntax error of the parameters passed to the programs but your command line looks fine to me so how does your ilink32.cfg look like?

  4. #4
    Registered User
    Join Date
    Feb 2005
    Posts
    54
    Quote Originally Posted by OnionKnight
    -w- removes warnings, -W compiles Windows programs so they're different.
    It looks like some sort of syntax error of the parameters passed to the programs but your command line looks fine to me so how does your ilink32.cfg look like?
    Figured it out. In the ilink32.config file, i hadd a space between the -L and "C\Borland\...\lib"
    It turns out that a space messes it up.

  5. #5
    chococoder
    Join Date
    Nov 2004
    Posts
    515
    it would. The content of the file is passed as a series of commandline arguments to the linker. The linker got 2 arguments (/L and your path) and interpreted them as such, when it expected a single argument (/L<path>).

  6. #6
    Frequently Quite Prolix dwks's Avatar
    Join Date
    Apr 2005
    Location
    Canada
    Posts
    8,045
    >bcc32 -w- demo2.c
    I thought it was -W.
    bcc32 -W demo2.c
    It's -W for GCC:
    Code:
    $ gcc -W -Wall -ansi -pedantic -O2 -o hello hello.c
    (I like to add -g or -s to GCC as well.)
    dwk

    Seek and ye shall find. quaere et invenies.

    "Simplicity does not precede complexity, but follows it." -- Alan Perlis
    "Testing can only prove the presence of bugs, not their absence." -- Edsger Dijkstra
    "The only real mistake is the one from which we learn nothing." -- John Powell


    Other boards: DaniWeb, TPS
    Unofficial Wiki FAQ: cpwiki.sf.net

    My website: http://dwks.theprogrammingsite.com/
    Projects: codeform, xuni, atlantis, nort, etc.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Multiple Cpp Files
    By w4ck0z in forum C++ Programming
    Replies: 5
    Last Post: 11-14-2005, 01:41 PM
  2. I Need To Know Some Things That I Can Put Into A Batch File
    By TheRealNapster in forum A Brief History of Cprogramming.com
    Replies: 1
    Last Post: 10-20-2003, 08:12 PM
  3. Borland 5.5 Header Files and Libraries
    By Zoalord in forum C++ Programming
    Replies: 5
    Last Post: 09-12-2003, 07:48 PM
  4. Using c++ standards
    By subdene in forum C++ Programming
    Replies: 4
    Last Post: 06-06-2002, 09:15 AM
  5. Problem with Borland 5.5 Compiling Windows Programs
    By Unregistered in forum C++ Programming
    Replies: 3
    Last Post: 08-28-2001, 09:04 AM

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