time.h in EVC++ - Windows CE

This is a discussion on time.h in EVC++ - Windows CE ; Hi, I'm programming with EVC++ but i have a problem. I want to estimate the execution time of a function. The code is this: #include int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpCmdLine, int CmdShow) { clock_t start, end; start ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: time.h in EVC++

  1. time.h in EVC++

    Hi,
    I'm programming with EVC++ but i have a problem.
    I want to estimate the execution time of a function. The code is this:

    #include

    int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
    LPTSTR lpCmdLine, int CmdShow)
    {
    clock_t start, end;

    start = clock();
    // function to estimate
    end= clock();

    }

    It doesn't give me compiler error but when i build the project gives
    me this error:

    error LNK2019: unresolved external symbol _clock referenced in
    function _WinMain

    How can i resolve this problem?
    Thanks


  2. Re: time.h in EVC++

    Questions about programming are far more likely to get useful answers
    if asked in a newsgroup for programmers. I just used google () to look
    up
    time.h evc
    and got 39 hits. I took a quick look and saw several threads that
    provide relevant and useful info. I also saw names of more relevant
    newsgroups.


    On Sun, 05 Aug 2007 09:45:53 -0000, Lucio
    wrote:

    >Hi,
    >I'm programming with EVC++ but i have a problem.
    >I want to estimate the execution time of a function. The code is this:
    >
    >#include
    >
    >int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
    >LPTSTR lpCmdLine, int CmdShow)
    >{
    >clock_t start, end;
    >
    >start = clock();
    >// function to estimate
    >end= clock();
    >
    >}
    >
    >It doesn't give me compiler error but when i build the project gives
    >me this error:
    >
    >error LNK2019: unresolved external symbol _clock referenced in
    >function _WinMain
    >
    >How can i resolve this problem?
    >Thanks


    -----------------------------------------
    To reply to me, remove the underscores (_) from my email address (and please indicate which newsgroup and message).

    Robert E. Zaret, eMVP
    PenFact, Inc.
    20 Park Plaza, Suite 400
    Boston, MA 02116
    www.penfact.com

+ Reply to Thread