INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Jobs

C headers, part 2

C headers, part 2

(OP)
Non-C programmer here.

I'm using GCC and Gfortran V5.2 (which BTW self compiled perfectly), on Windows7(64).

I'm getting this C error.

rpc/types.h:78:9: error: unknown type name '__u_char'
typedef __u_char u_char;

What does the double underscore do, what does it mean?

Thank you.

RE: C headers, part 2

If the code is following ANSI standards, double underscores are reserved for compiler-specific libraries/functions.

Dan - Owner
http://www.Hi-TecDesigns.com

RE: C headers, part 2

(OP)

Therefor in this case, since I have the source code, does it make sense to remove all the double underscores?

Thank you.

RE: C headers, part 2

How can you remove them? They're part of the compiler library. You have to change your source code so you aren't attempting something that's weirding out the compiler or you need to get the compiler fixed.

Or are you actually typing in the double underscores?

Keith Cress
kcress - http://www.flaminsystems.com

RE: C headers, part 2

I think a good book on ANSI C is in order here. While learning what compiler errors really mean appears to be a right of passage for all programmers, it would help immensely if you understood what the basic code is attempting to do... for example, what "typedef" means. I think once you understood that, the error will make more sense... you may not know enough to immediately resolve the issue, but you will likely be able to track down the root cause.

Dan - Owner
http://www.Hi-TecDesigns.com

RE: C headers, part 2

(OP)

Sometimes open source projects compile link and run effortlessly which motivates you to try another, like this project, which requires the xdr components from glibc.

The source code is readily available but the headers account for half the code.

It's convoluted because of all the ifdef possibilities to accommodate compiling on almost any hardware.

Thank you for your input.

RE: C headers, part 2

Are you running an IDE or just compiling with GCC? I would try bringing the project into an IDE. It might provide better descriptions of the errors and hopefully give you more direction. I personally like Code::Blocks, which is free.
http://www.codeblocks.org/

RE: C headers, part 2

(OP)

I'm using a combination of command-line and makefile, and Codeblocks.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources


Close Box

Join Eng-Tips® Today!

Join your peers on the Internet's largest technical engineering professional community.
It's easy to join and it's free.

Here's Why Members Love Eng-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close