By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,281 Members | 2,268 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,281 IT Pros & Developers. It's quick & easy.

newb compile question

P: n/a
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
Nov 14 '05 #1
Share this Question
Share on Google+
5 Replies


P: n/a
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 .
Nov 14 '05 #2

P: n/a
> 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
Nov 14 '05 #3

P: n/a
"none" <no**@none.com> 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
Nov 14 '05 #4

P: n/a
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
Nov 14 '05 #5

P: n/a
pete <pf*****@mindspring.com> 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) ks***@mib.org <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.
Nov 14 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.