2.8.0, WinCE and time functions
Mickey Mestel
mickm at carmick.com
Wed Jan 17 15:22:52 PST 2007
hi,
i have a project that is running widgets 2.6.3 on wince, compiled under=
VS2005 with the Mobile 5.0 SDK.
using the 2.8.0 libs and include files, i ran into a problem with the t=
ime functions. the first issue was the following error:
SDKFuncs.cpp
c:\Program Files\wxWidgets-2.8.0\include\wx/datetime.h(1085) : error C3861:=
'localtime': identifier not found
datetime.h has the following:
#ifndef __WXWINCE__
#include <time.h>
#else
#include "wx/msw/wince/time.h"
#endif
so i went there, only to find the following ifdef which is different fr=
om 2.6.3, (declarations after the ifdef are the same in 2.6.3):
// VC8 CRT provides the other functions
#if !defined(__VISUALC__) || (__VISUALC__ < 1400)
struct tm * __cdecl localtime(const time_t *);
struct tm * __cdecl gmtime(const time_t *);
#define _tcsftime wcsftime
size_t __cdecl wcsftime(wchar_t *, size_t, const wchar_t *, const struct tm=
*);
extern long timezone;
#endif // !VC8
in my case, __VISUALC__ is defined as _MSC_VER, which is 1400, so the st=
atements following this ifdef are not included, hence the error listed abov=
e. i then found out that i needed to change the corresponding ifdef to an=
#if 0:
#if defined(__VISUALC__) && (__VISUALC__ >=3D 1400)
in .../src/msw/wince/time.cpp
once i did this, my app compiled ok.
despite these comments, these time functions are not supplied by VS2005=
, and are not in the Mobile 5.0 SDK.
i think this needs to be looked at again. it appears to me that these =
files should stay as they were in 2.6.3.
any comments or thoughts? i would like to do something with this so th=
at i don't have a rogue library set lying around, know what i mean?
thanks,
mickm
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.wxwidgets.org/pipermail/wx-dev/attachments/20070117/78c4b=
06d/attachment.htm
More information about the wx-dev
mailing list