getuptime does it work? - Minix

This is a discussion on getuptime does it work? - Minix ; How can I use the function getuptime in my server ? I included the sysutil.h in my header (#include but it doesn't work because when I compile my file, I get the error undefined reference: _getuptime I don't understand this ...

+ Reply to Thread
Results 1 to 5 of 5

Thread: getuptime does it work?

  1. getuptime does it work?

    How can I use the function getuptime in my server ?
    I included the sysutil.h in my header (#include but
    it doesn't work because when I compile my file, I get the error
    undefined reference:
    _getuptime

    I don't understand this error because I've written in my code
    getuptime and not _getuptime.
    Thank you in advance

  2. Re: getuptime does it work?

    On Jun 24, 5:24 am, puntino wrote:
    > How can I use the function getuptime in my server ?
    > I included the sysutil.h in my header (#include but
    > it doesn't work because when I compile my file, I get the error
    > undefined reference:
    > _getuptime


    The sysutil is a lib, so compile your file first and link it with this
    lib:
    cc yourfile.c -c -o yourfile.o
    cc yourfilr.o -lsys -o yourfile

    >
    > I don't understand this error because I've written in my code
    > getuptime and not _getuptime.


    The compiler will auto add a '_' before every name defined in C, when
    compile it into Assambel. But I'm not sure for this.

    > Thank you in advance



  3. Re: getuptime does it work?

    On Jun 24, 3:10 am, wubingzheng wrote:
    > On Jun 24, 5:24 am, puntino wrote:
    >
    > > How can I use the function getuptime in my server ?
    > > I included the sysutil.h in my header (#include but
    > > it doesn't work because when I compile my file, I get the error
    > > undefined reference:
    > > _getuptime

    >


    Thank you, wubingzheng
    i added the instruction in my makefile but I get the error no space on
    device 3/129
    I think it is due to the fact that the library is not loaded
    dinamically.
    How can I fix it ?




    > cc yourfile.c -c -o yourfile.o
    > cc yourfilr.o -lsys -o yourfile
    >
    >
    >
    > > I don't understand this error because I've written in my code
    > > getuptime and not _getuptime.

    >
    > The compiler will auto add a '_' before every name defined in C, when
    > compile it into Assambel. But I'm not sure for this.
    >
    > > Thank you in advance



  4. Re: getuptime does it work?

    puntino wrote:
    > Thank you, wubingzheng
    > i added the instruction in my makefile but I get the error no space on
    > device 3/129
    > I think it is due to the fact that the library is not loaded
    > dinamically.
    > How can I fix it ?


    No space on device almost certainly means your partition is full. Use 'df'
    to check out the file system and see if it is indeed (almost) full.

    Regards,

    Jens

    --
    Jens de Smit
    Student Computer Science | Vrije Universiteit Amsterdam
    jfdsmit@few.vu.nl | http://www.few.vu.nl/~jfdsmit
    "[In the end, people] get furious at IT that the goddamn magic isn't working"
    -- Stewart Dean

  5. Re: getuptime does it work?

    Thank you both
    i fixed it the problem was that my home partition was full and
    I was secure that it was empty I forgot to check the free space.

+ Reply to Thread