sys/types.h

This is a discussion on sys/types.h within the C Programming forums, part of the General Programming Boards category; i am trying to write a client program.while compilng this program i receave such an error "u_long undeclared" altough sys/types.h ...

  1. #1
    Registered User mayfda's Avatar
    Join Date
    Apr 2002
    Posts
    11

    sys/types.h

    i am trying to write a client program.while compilng this program i receave such an error
    "u_long undeclared" altough sys/types.h is included what should i do?

    where can i find sys/types.h?
    -mayfda-

  2. #2
    Im back! shaik786's Avatar
    Join Date
    Jun 2002
    Location
    Bangalore, India
    Posts
    345
    What OS? What Compiler???

    Open this file and try to locate where this datatype has been defined. If it is not there, typedef yourself this datatype in your program.

    If it's on UNIX, it's usually in /usr/include/ directory.

  3. #3
    Me want cookie! Monster's Avatar
    Join Date
    Dec 2001
    Posts
    680
    Which compiler/OS are you using (linux)?
    I think u_long is the same as unsigned long.
    Add the following line on the top of your code:
    Code:
    typedef unsigned long ulong;

Popular pages Recent additions subscribe to a feed

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21