compiling the source below, you get the following compiler-error because in tchar.h, the macro _putts is missing.
O:\Sources\test2\test2.c(21): warning #2018: Undeclared function '_putts' (did you mean: fputws?); assuming 'extern' returning 'int'.
_putts(_T("Hello World"));
--- Source
#define _UNICODE
#define WORKAROUND
#undef WORKAROUND
#include <stdio.h>
#include <tchar.h> // missing _putts() (and _putws)
#if defined WORKAROUND
/* function _putws() missed although */
# if defined _UNICODE
# define _putws(s) {_fputts((s), stdout); _fputts(_T("\n"), stdout); }
# define _putts(s) _putws(s)
# else
# define _putts(s) puts(s)
# endif
#endif
int main(void)
{
_putts(_T("Hello World"));
}
msvcrt.dll exports the function _putws. Creating the import library :
\PellesC\bin\polib /OUT:msvcrt.lib /MACHINE:x86 C:\Windows\System32\msvcrt.lib
#include <stdio.h>
extern int _putws(const wchar_t *str);
int main(void)
{
_putws(L"This is a _putws test.");
return 0;
}