locked
Unresolved external symbol time RRS feed

  • Question

  • In which lib I find time() function?! I've included time.h but I can't find nothing in the docs about were is that function.
    I need it badly for srand(time(0)) and compiler always shows 'unresolved external symbol time'.

    If You'll find my answer satisfactory or helpful - mark it as answered or vote for it! Thank You.
    "If You think You know better then me, why is Your code not working, then don't waste my time at this forum. Otherwise - do as I'm suggesting."
    Thursday, September 10, 2009 6:42 PM

Answers

  • So it seems to be rather a question for guys from Microsoft :) I'm affraid it's not implemented for Windows Mobile. Have you seen this thread?
    http://social.msdn.microsoft.com/Forums/en-US/vssmartdevicesnative/thread/b3cfe5ec-544c-42d8-9717-8f24a4879e6c

    Regards,
    Pawel
    • Marked as answer by Mal Loth Thursday, September 10, 2009 8:10 PM
    Thursday, September 10, 2009 8:01 PM

All replies

  • I don't know time() but if you need it only for a seed in rand function, you may use GetCurrentFT which fills FILETIME structure:
    http://msdn.microsoft.com/en-us/library/aa914579.aspx

    Regards,
    Pawel
    Thursday, September 10, 2009 7:35 PM
  • Yeah I know :). I can also use GetSystemTime (and it's miliseconds) or GetTickCount() but I just want to know where is time() function, because I fall upon this error more then once in my C++ adventures :).
    If You'll find my answer satisfactory or helpful - mark it as answered or vote for it! Thank You.
    "If You think You know better then me, why is Your code not working, then don't waste my time at this forum. Otherwise - do as I'm suggesting."
    Thursday, September 10, 2009 7:52 PM
  • So it seems to be rather a question for guys from Microsoft :) I'm affraid it's not implemented for Windows Mobile. Have you seen this thread?
    http://social.msdn.microsoft.com/Forums/en-US/vssmartdevicesnative/thread/b3cfe5ec-544c-42d8-9717-8f24a4879e6c

    Regards,
    Pawel
    • Marked as answer by Mal Loth Thursday, September 10, 2009 8:10 PM
    Thursday, September 10, 2009 8:01 PM
  • So it seem that's depreciated function which wasn't deleted from MS header files.
    Oh, well - I guess that I must remember to NOT to use it :).

    Thanks Paweł for finding that topic. MS quick search didn't show me this.

    If You'll find my answer satisfactory or helpful - mark it as answered or vote for it! Thank You.
    "If You think You know better then me, why is Your code not working, then don't waste my time at this forum. Otherwise - do as I'm suggesting."
    Thursday, September 10, 2009 8:09 PM