Pelles C forum

C language => Pocket PC and Smartphone questions => Topic started by: jasch212 on April 05, 2010, 04:58:50 PM

Title: POLINK: error: Unresolved external symbol 'wcscpy_s'.
Post by: jasch212 on April 05, 2010, 04:58:50 PM
hello,
does anyone know which lib i must add in the projectSettings to link with wcscpy_s ?
i am using 5.0
thanks
Title: Re: POLINK: error: Unresolved external symbol 'wcscpy_s'.
Post by: JohnF on April 09, 2010, 10:54:28 AM
Looking at the header (wchar.h) I don't think wcscpy_s is available for the Pocket PC.

John
Title: Re: POLINK: error: Unresolved external symbol 'wcscpy_s'.
Post by: jasch212 on April 10, 2010, 12:47:26 PM
hello john,

i found:
errno_t __cdecl wcscpy_s(wchar_t * restrict, rsize_t, const wchar_t * restrict);

in pellec/include/wchar.h

and in the PelleHelp for wcscpy the first sentence:

"Purpose:
Copies a wide string. The safer wcscpy_s function is also available."

thomas

Title: Re: POLINK: error: Unresolved external symbol 'wcscpy_s'.
Post by: JohnF on April 10, 2010, 01:37:33 PM
Hello Thomas,

If you look in that header you will find

/* more secure C functions (TR24731-1) */
#if __STDC_WANT_LIB_EXT1__ && !defined(_WINCE)

which excludes that function from WINCE.

The reason not all functions are included in WINCE is to save room, I've heard.

John
Title: Re: POLINK: error: Unresolved external symbol 'wcscpy_s'.
Post by: jasch212 on April 11, 2010, 10:36:36 AM
ok,
i found it, thank you John

Thomas