BSTR ERROR LNK2019: External symbol "char * unable to resolve

xiaoxiao2021-03-06  37

Setting of the project in "C / C -> Language -> Treat Wchar_t as Built-in Type" to "no" (ORIGINALLY IT WAS: "YES (/ zc: wchar_t)".

/ Zc: wchar_t (WCHAR_T is this type of machine)

See

/ Zc (consistency)

/ Zc: wchar_t

If / zc: WCHAR_T is not specified, the compiler requires you or defines a file (such as Wchar.h) in a wide-header file that defines Wchar_t. Wchar_t is usually defined as unsigned short.

When specifying / zc: wchar_t compiler option, type WCHAR_T is a native type mapped to __wchar_t, and its mapping mode is the same as Short map to __INT16.

If you use / zc: wchar_t, the compiler identifies WCHAR_T as a native type. For more information on Wchar_t, see

Data type range

.

__wchar_t is always available.

By providing overloading for WCHAR_T's unsigned short format and __wchar_t variants, you can create libraries that easily use (or unused) / zc: wchar_t compilation, and no need to provide the library two different Version (enabled and version of the ZC: Wchar_t).

Specify / zc: wchar_t, define _wchar_t_defined and _native_wchar_t_defined symbol; for more information, see

Predefined macro

.

For more information on consistency issues for Visual C , see

Standard compliance issues in Visual C

.

Set this compiler option in the Visual Studio development environment

Open the Properties Page dialog of this item. For more information, see Setting up the Visual C project properties. Click the "C / C " folder. Click the Language Properties page. Modify "View WCHAR_T as Built-in Type" properties.

MS-help: //ms.msdnqtr.2003feb.2052/vccore/html/vclrfzcwchar_t.htm

转载请注明原文地址:https://www.9cbs.com/read-118384.html

New Post(0)