[Live-devel] compilation errors on WINCE
pierre.lhussiez
pierre.lhussiez at laposte.net
Fri Jul 1 10:32:38 PDT 2005
I have compiled the live library (version 2005.06.29) with evc 4
And there was some errors.
Erros description following:
Error while compiling library:
F:\envce\Applicpp\AppliStd\AudioStreaming\libStreaming\liveMedia\ByteStreamFileSource.cpp(74) : error C2065: 'fseeko' : undeclared identifier
F:\envce\Applicpp\AppliStd\AudioStreaming\libStreaming\liveMedia\ByteStreamFileSource.cpp(74) : error C2065: 'off_t' : undeclared identifier
Fseeko doesnt exist in evc4 so I have used this to passed through:
/* defines for compatibility */
#if defined(_WIN32_WCE)
#define off_t long
#define fseeko fseek
#endif
Error while using library:
The following error arrived when using RTSPServer classe
libStreaming.lib(RTSPServer.obj) : error LNK2019: unresolved external symbol _strftime referenced in function "char const * __cdecl dateHeader(void)" (?dateHeader@@YAPBDXZ)
libStreaming.lib(RTSPServer.obj) : error LNK2019: unresolved external symbol _gmtime referenced in function "char const * __cdecl dateHeader(void)" (?dateHeader@@YAPBDXZ)
libStreaming.lib(RTSPServer.obj) : error LNK2019: unresolved external symbol _time referenced in function "char const * __cdecl dateHeader(void)" (?dateHeader@@YAPBDXZ)
strftime(), gmtime() and time() doent exist in evc4
i have to use CTime classe or this set of function:
GetSystemTime() instead time()
GetDateFormat() and GetTimeFormat instead strftime()
I have choose the second solution
My new dateHeader(void) function look like this:
static char const* dateHeader() {
int ret;
SYSTEMTIME SystemTime;
GetSystemTime(&SystemTime);
WCHAR dateFormat[] = L"ddd, MMM dd yyyy";
WCHAR timeFormat[] = L"HH:mm:ss GMT\r\n";
WCHAR buf[200];
DWORD locale = LOCALE_NEUTRAL;
GetDateFormat(locale, 0, &SystemTime,
(LPTSTR)dateFormat, (LPTSTR)buf, sizeof buf
buf[ret - 1] = ' ';
ret = GetTimeFormat(locale, 0, &SystemTime,
(LPTSTR)timeFormat, (LPTSTR)buf + ret, (sizeof buf) - ret)
char *retBuf = new char[wcslen(buf)];
wcstombs(retBuf, buf, wcslen(buf));
return (retBuf);
}
Is any wince developers have seen those problems ?
Accédez au courrier électronique de La Poste : www.laposte.net ;
3615 LAPOSTENET (0,34/mn) ; tél : 08 92 68 13 50 (0,34/mn)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.live.com/pipermail/live-devel/attachments/20050701/e7303a8d/attachment.html
More information about the live-devel
mailing list