2012年10月8日 星期一

[Webkit] error LNK2019: unresolved external symbol localtime_s referenced in function localtimeOffset

When I build webkit with WinCE 6.0 SDK, I got the error message as title.
error LNK2019: unresolved external symbol localtime_s referenced in function localtimeOffset

To solve the problem, I remove the code in bold font below.

#if !defined(HAVE_LOCALTIME_R) && !defined(HAVE_LOCALTIME_S) && \
     defined(_MSC_VER) && defined(_CRT_INSECURE_DEPRECATE)
//#define HAVE_LOCALTIME_S 1
#endif


After that, I got the error message below.
error C2040: 'localtime' : 'tm *(const time_t *)' differs in levels of indirection from 'int ()'

To solve the problem, I add the code before where function localtime is called.
struct tm *__cdecl localtime(const time_t *t);



Reference:
http://web.archiveorange.com/archive/v/fwvdeo1G1weLoWDuyUPP
http://hi.baidu.com/lihex/item/2243dfe144e14ef82a09a4d4
http://stackoverflow.com/questions/6380981/c-c-c4047-differs-in-levels-of-indirection-from-int

1 則留言:

  1. Hi,
    Had you successfully built the WebKit App in WinCE 6.0?
    How about it's compatibility and efficient?
    We are looking for the web/html5 solution for WinCE 6.0 and 7.0. I don't find any solution.

    Best Regards,
    Eddie

    回覆刪除