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!
  • Students Click Here

*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.

Students Click Here


C Headers, part 3

C Headers, part 3

C Headers, part 3

Making progress.

Next error involves macros,
and reviewing Kernigen and Ritchie
4.11.2 Macro Substitution
A definition has the form
#define name replacement text
It calls for a macro substitution of the simplest kind-subsequent occurrences of
the token name will be replaced by the replacement text.

The actual error

CODE --> c

C:\gcc\bin\gcc.exe  -c cxdrinit.c
In file included from rpc/types.h:97:0,
                 from rpc/rpc.h:38,
                 from cxdrinit.c:2:
rpc/in.h:38:9: error: macro names must be identifiers
 #define <a name="_NETINET_IN_H_" <="" a=""><b>_NETINET_IN_H_</b>

Does it make sense to count both left and right brackets?


RE: C Headers, part 3

It looks like some HTML got mixed in there. Not sure if that is really in your code or if you copy/pasted from some sort of rich text? Either way, a macro can't start with a _ underscore or a < less than character. It needs to start with a letter.

RE: C Headers, part 3

That is a rather strange one. My rpc/rpc.h contains


#include <netinet/in.h> 
But then again, I am running the Linux version: not the Windows version.

RE: C Headers, part 3

Maybe that's my problem, I'm mixing windows and Linux.

I'm using Windows7, GCC 5.2, MinGW command-line and make.

Searching for information, I read somewhere that MinGW no longer includes some essential variable types, so this project has changed from a compile link and run to a minor rewrite.

Do you know of a "windows ready" xdr library?

RE: C Headers, part 3


Thank you, tried that.

Just to be clear, I'm using Windows7, GCC-5.2, and a MinGW msys-1.0 command window.

I call success being able to download the source, execute ./configure, make, and make install, with no errors.

I have attempted this with:

WinPortableXDR-4.9.1, and

The only package that works on my machine is sunrpc.

All the others go down a rabbit hole of macros and header errors.

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! Already a Member? Login


eBook - Rethink Your PLM
A lot has changed since the 90s. You don't surf the Web using dial-up anymore, so why are you still using a legacy PLM solution that's blocking your ability to innovate? To develop and launch products today, you need a flexible, cloud-based PLM, not a solution that's stuck in the past. Download Now
White Paper - Using Virtualization for IVI and AUTOSAR Consolidation on an ECU
Current approaches used to tackle the complexities of a vehicle’s electrical and electronics (E/E) architecture are both cost prohibitive and lacking in performance. Utilizing virtualization in automotive software architecture provides a better approach. This can be achieved by encapsulating different heterogeneous automotive platforms inside virtual machines running on the same hardware. Download Now

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