Sunday, October 11, 2009

OOP344 Assignment progress 2

With Jonathan's help I was able to pass all tests on VCC and LINUX (Thank you Jonathan!)
But now I'm having trouble compiling in borland.
I compiled with the command
bcc32 main.c ciol.c (I hope this is the right command)
But I got a whole bunch of "no prototype" warnings:
call to function "io_init" with no protype in function main
or
call to function "test 1" with no protype in function main

I've included the .h file in both main and ciol.c
Anyone has any idea what's going on?

3 comments:

  1. Hmmm sounds like a linking issue to me; I think that you need to tell bcc to include the standard windows library/headers when compiling.

    I could be very wrong however; still, I do think that it's a linking issue. Maybe someone else will help you more.

    -Hasan

    ReplyDelete
  2. Ok I have a suggestion: try typing
    bcc32 -tW main.c ciol.c

    this MIGHT work, emphasis on the might lol.

    -Hasan

    ReplyDelete
  3. The problem with the prototype warnings is that borland wants functions with no parameters to specify void in the prototypes.
    i.e. int test1 (void);
    instead of: int test1 ();

    ReplyDelete