Re: Using _UNICODE for internalization

From: Markus Scherer (
Date: Thu Nov 05 1998 - 11:24:57 EST


in your project settings, define _MBCS in the non-Unicode configurations, and
define *both* UNICODE and _UNICODE in your Unicode-configurations. Different
headers use either macro. The _MBCS ensures that you get the multi-byte
versions of the string functions (_mbscpy() etc.) that you need for true MBCS
codepages if you are not using Unicode (on Win9x).

We always use TCHAR without the "_", but that should not really matter.

The ANSI string-constant concatenation
    "abc" "xyz"
    _T("abc") _T("xyz")

For a console app, the entry point is wmainCRTStartup , and use int _tmain(int
argc, TCHAR **argv, TCHAR **envp) {} .

Don't try to convert strings with the USES_CONVERSION technique (T2A, W2CT,
...) in a catch() {}.

Good luck!


Markus Scherer IBM RTP +1 919 486 1135 Dept. Fax +1 919 254 6430 on 98-11-05 10:57:05
Please respond to
Subject: Using _UNICODE for internalization


I am currently in the process of internalionalizing a product, so that it can
handle Japanese characters on Windows NT environment.

With respect to this, changes relating to "char" have been made to "_TCHAR".
Also, _TCHAR would be treated as "wchar_t" if _UNICODE is defined and as "char"
if nothing is defined. Also, in the Output Category of the Link tab in the
Project Settings dialog box, the Entry Point Symbol has been made to

Inspite of doing the above i.e. defining _UNICODE and setting
wWinMainCRTStartup, it doesn't seem to recognise _UNICODE and gives Linker
error LNK2001 : unresolved external symbol _wWinMain@16

Could someone suggest what is lacking in the above process.

Thanks and regards,


This archive was generated by hypermail 2.1.2 : Tue Jul 10 2001 - 17:20:42 EDT