Find the answer to your Linux question:
Results 1 to 3 of 3
Hi all, When i tried to complie a program, i get error like, error: `gid_t' previously declared here error: `uid_t' previously declared here what's this error ?...
  1. #1
    Linux Guru Lakshmipathi's Avatar
    Join Date
    Sep 2006
    Location
    3rd rock from sun - Often seen near moon
    Posts
    1,568

    Thumbs up what's this error mean?

    Hi all,
    When i tried to complie a program, i get error like,
    error: `gid_t' previously declared here
    error: `uid_t' previously declared here


    what's this error ?
    - Lakshmipathi.G
    -------------------
    FOSS India Award winning ext3fs Undelete tool and tutorials www.giis.co.in
    First they criticize you,Then they laugh at you,Then they fight with you,Then you win. - M.K.Gandhi
    -------------------

  2. #2
    Linux Engineer wje_lf's Avatar
    Join Date
    Sep 2007
    Location
    Mariposa
    Posts
    1,192
    It means that gid_t and uid_t have been declared at more than one place in your program.

    If you look more closely at the details of the error messages, you'll find each location of the multiple declarations.

    My guess is that you gave certain variables the names gid_t and uid_t. You're not supposed to do that, because those names have already been used as names of types (as opposed to names of variables). In general, you should avoid giving variables names that end in _t .

    But my guess could be wrong.

    If you can't figure out from the rest of the error messages what's going on, post all the error messages from this compilation and we'll take a crack at it.
    --
    Bill

    Old age and treachery will overcome youth and skill.

  3. #3
    Linux Guru Lakshmipathi's Avatar
    Join Date
    Sep 2006
    Location
    3rd rock from sun - Often seen near moon
    Posts
    1,568
    yes ..i think your right.actually i'm indeed accessing those kernel struct variables...but i have multiple kernels installed on my system...i think that's the problem.
    I hope to remove old kernels and re-run the same program and get back here.
    Thanks for your help.
    - Lakshmipathi.G
    -------------------
    FOSS India Award winning ext3fs Undelete tool and tutorials www.giis.co.in
    First they criticize you,Then they laugh at you,Then they fight with you,Then you win. - M.K.Gandhi
    -------------------

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...