Find the answer to your Linux question:
Results 1 to 3 of 3
spin.c:54: error: ‘time’ redeclared as different kind of symbol /usr/include/time.h:184: error: previous declaration of ‘time’ was here I get this when trying to compile although I used it exactly as ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Aug 2005
    Posts
    66

    error: ‘time’ redeclared as different kind of symbol


    spin.c:54: error: ‘time’ redeclared as different kind of symbol
    /usr/include/time.h:184: error: previous declaration of ‘time’ was here

    I get this when trying to compile although I used it exactly as said in examples and docs. What is wrong?

  2. #2
    Linux Guru Cabhan's Avatar
    Join Date
    Jan 2005
    Location
    Seattle, WA, USA
    Posts
    3,252
    I assume that your code is including time.h?

    Basically, 'time' is declared somehow in time.h, and then you are declaring your own version of time, be it a struct type, function name, variable name, or whatever. To fix it, I should think you need only change your declaration to be something other than 'time'.

  3. #3
    Just Joined!
    Join Date
    Aug 2005
    Posts
    66
    Quote Originally Posted by Cabhan
    I assume that your code is including time.h?

    Basically, 'time' is declared somehow in time.h, and then you are declaring your own version of time, be it a struct type, function name, variable name, or whatever. To fix it, I should think you need only change your declaration to be something other than 'time'.
    Thanks, already got the problem. I did not see the code so when my friend asked me I just redirected it here. The problem was in another "time" variable.

    Moderators, please remove this thread.

Posting Permissions

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