newb compile question

Discussion in 'C Programming' started by none, Oct 4, 2004.

  1. none

    none Guest

    hi all,

    (i am running on win 2k pro).

    i saw a program i like on a website and when i went to download it it was
    just a load of 'c' code.

    now, i know very little about 'c' or programming but I downloaded 'miracle
    c' and pasted the code in and when i comiled it i got a load of errors.
    (below)

    to me the errors suggested there is a directory structure and many .h files
    (libraries?) missing.

    question is, is it as easy as manually creating the missing directory
    structure based on the error messages and putting the missing files in them
    or is there more to it.

    and next question is where do I get the missing .h files (libraries?)

    thanks

    n


    Miracle C Compiler (r3.2), written by bts.
    line 18: #include sys/types.h ignored--file not found.
    line 19: #include sys/socket.h ignored--file not found.
    line 20: #include netinet/in.h ignored--file not found.
    line 21: #include arpa/inet.h ignored--file not found.
    line 22: #include netdb.h ignored--file not found.
    line 24: #include unistd.h ignored--file not found.
    line 25: #include fcntl.h ignored--file not found.
    line 27: #include errno.h ignored--file not found.
    line 44: #define ignored--formal arg must be an identifier.
    Compiling C:\Program Files\Miracle C\test.c
    none, Oct 4, 2004
    #1
    1. Advertising

  2. none wrote:
    > hi all,
    >
    > (i am running on win 2k pro).
    >
    > i saw a program i like on a website and when i went to download it it was
    > just a load of 'c' code.
    >
    >
    >
    >
    > Miracle C Compiler (r3.2), written by bts.
    > line 18: #include sys/types.h ignored--file not found.
    > line 19: #include sys/socket.h ignored--file not found.
    > line 20: #include netinet/in.h ignored--file not found.
    > line 21: #include arpa/inet.h ignored--file not found.
    > line 22: #include netdb.h ignored--file not found.
    > line 24: #include unistd.h ignored--file not found.
    > line 25: #include fcntl.h ignored--file not found.
    > line 27: #include errno.h ignored--file not found.
    > line 44: #define ignored--formal arg must be an identifier.
    > Compiling C:\Program Files\Miracle C\test.c
    >
    >


    The list of headers that are reported to be missing are all
    non-standard headers, which means a C compiler need not / may not
    support it.

    <OT>
    May be, try to compile this on a *NIX environment with the GNU C/C++
    compiler system. If you encounter any issues, please post to
    relevant n.g - comp.unix.programmer / gnu.gcc.help , since they
    are Off-topic here.
    </OT>


    --
    Karthik.
    http://akktech.blogspot.com .
    Karthik Kumar, Oct 4, 2004
    #2
    1. Advertising

  3. none

    none Guest

    > The list of headers that are reported to be missing are all
    > non-standard headers, which means a C compiler need not / may not
    > support it.
    >
    > <OT>
    > May be, try to compile this on a *NIX environment with the GNU C/C++
    > compiler system. If you encounter any issues, please post to
    > relevant n.g - comp.unix.programmer / gnu.gcc.help , since they
    > are Off-topic here.
    > </OT>
    >
    >
    > --
    > Karthik.
    > http://akktech.blogspot.com .



    thanks for your response.

    wow.. and there was me thinking i had an idea what was going on.. now i am
    completely confused.

    hey sorry for the off topic post.

    n
    none, Oct 4, 2004
    #3
  4. none

    Ben Pfaff Guest

    "none" <> writes:

    > question is, is it as easy as manually creating the missing directory
    > structure based on the error messages and putting the missing files in them
    > or is there more to it.
    >
    > and next question is where do I get the missing .h files (libraries?)


    Read the C FAQ.

    10.11: I seem to be missing the system header file <sgtty.h>.
    Can someone send me a copy?

    A: Standard headers exist in part so that definitions appropriate
    to your compiler, operating system, and processor can be
    supplied. You cannot just pick up a copy of someone else's
    header file and expect it to work, unless that person is using
    exactly the same environment. Ask your compiler vendor why the
    file was not provided (or to send a replacement copy).

    --
    "Some people *are* arrogant, and others read the FAQ."
    --Chris Dollin
    Ben Pfaff, Oct 4, 2004
    #4
  5. none

    pete Guest

    Karthik Kumar wrote:
    >
    > none wrote:
    > > hi all,
    > >
    > > (i am running on win 2k pro).
    > >
    > > i saw a program i like on a website and when i went to download it it was
    > > just a load of 'c' code.
    > >
    > >
    > >
    > >
    > > Miracle C Compiler (r3.2), written by bts.
    > > line 18: #include sys/types.h ignored--file not found.
    > > line 19: #include sys/socket.h ignored--file not found.
    > > line 20: #include netinet/in.h ignored--file not found.
    > > line 21: #include arpa/inet.h ignored--file not found.
    > > line 22: #include netdb.h ignored--file not found.
    > > line 24: #include unistd.h ignored--file not found.
    > > line 25: #include fcntl.h ignored--file not found.
    > > line 27: #include errno.h ignored--file not found.
    > > line 44: #define ignored--formal arg must be an identifier.
    > > Compiling C:\Program Files\Miracle C\test.c
    > >
    > >

    >
    > The list of headers that are reported to be missing are all
    > non-standard headers, which means a C compiler need not / may not
    > support it.


    errno.h is a standard header file.

    --
    pete
    pete, Oct 5, 2004
    #5
  6. pete <> writes:
    > Karthik Kumar wrote:
    >>
    >> none wrote:
    >> > hi all,
    >> >
    >> > (i am running on win 2k pro).
    >> >
    >> > i saw a program i like on a website and when i went to download it it was
    >> > just a load of 'c' code.
    >> >
    >> >
    >> >
    >> >
    >> > Miracle C Compiler (r3.2), written by bts.
    >> > line 18: #include sys/types.h ignored--file not found.
    >> > line 19: #include sys/socket.h ignored--file not found.
    >> > line 20: #include netinet/in.h ignored--file not found.
    >> > line 21: #include arpa/inet.h ignored--file not found.
    >> > line 22: #include netdb.h ignored--file not found.
    >> > line 24: #include unistd.h ignored--file not found.
    >> > line 25: #include fcntl.h ignored--file not found.
    >> > line 27: #include errno.h ignored--file not found.
    >> > line 44: #define ignored--formal arg must be an identifier.
    >> > Compiling C:\Program Files\Miracle C\test.c
    >> >
    >> >

    >>
    >> The list of headers that are reported to be missing are all
    >> non-standard headers, which means a C compiler need not / may not
    >> support it.

    >
    > errno.h is a standard header file.


    <QUIBBLE>
    It's a standard header, not necessarily a standard header file.
    </QUIBBLE>

    Warning: The following is almost pure speculation.

    You have to use the correct syntax to refer to it:

    #include <errno.h>

    The OP said he cut-and-pasted the code from a web site. The reported
    error messages make me suspect that the '<' and '>' characters were
    lost (I'd expect the text between the '<' and '>' to vanish as well,
    but we can't tell exactly what happened).

    That's assuming that Miracle C would ordinarily include the delimiters
    in error messages. On the other hand, if a compiler sees

    #include errno.h

    it should complain about the bad syntax, not about a missing file.
    I have no idea how Miracle C behaves in this area.

    --
    Keith Thompson (The_Other_Keith) <http://www.ghoti.net/~kst>
    San Diego Supercomputer Center <*> <http://users.sdsc.edu/~kst>
    We must do something. This is something. Therefore, we must do this.
    Keith Thompson, Oct 5, 2004
    #6
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. :\\\\derian

    newb question

    :\\\\derian, Oct 17, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    349
    Marina
    Oct 17, 2003
  2. xerj
    Replies:
    4
    Views:
    350
  3. =?Utf-8?B?RXJpYw==?=

    Newb textbox question

    =?Utf-8?B?RXJpYw==?=, Jan 31, 2006, in forum: ASP .Net
    Replies:
    2
    Views:
    390
    =?Utf-8?B?UGV0ZXIgQnJvbWJlcmcgW0MjIE1WUF0=?=
    Jan 31, 2006
  4. NewB Insert Question

    , Mar 6, 2006, in forum: ASP .Net
    Replies:
    4
    Views:
    381
  5. Nagaraj
    Replies:
    1
    Views:
    854
    Lionel B
    Mar 1, 2007
Loading...

Share This Page