File tree Expand file tree Collapse file tree 2 files changed +4
-1
lines changed Expand file tree Collapse file tree 2 files changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -101,7 +101,7 @@ historical reasons.
101101 headers require it.
102102* ` UnicodeEnvironment ` (` true ` , ` false ` ): Enable/disable compiling for a Unicode
103103 environment when targeting Windows in C/C++ projects. This causes the
104- ` UNICODE ` macro to be defined, and makes it so that
104+ ` UNICODE ` and ` _UNICODE ` macros to be defined, and makes it so that
105105 [ ` wmain ` ] ( https://learn.microsoft.com/en-us/cpp/c-language/using-wmain ) and
106106 [ ` wWinMain ` ] ( https://learn.microsoft.com/en-us/windows/win32/learnwin32/winmain--the-application-entry-point )
107107 entry point functions must be used when building executables. Defaults to
Original file line number Diff line number Diff line change @@ -321,7 +321,10 @@ protected override string GenerateCommandLineCommands()
321321 builder . AppendSwitch ( "-fexceptions" ) ;
322322
323323 if ( UnicodeEnvironment )
324+ {
324325 builder . AppendSwitch ( "-municode" ) ;
326+ builder . AppendSwitchIfNotNull ( "-D " , "_UNICODE" ) ;
327+ }
325328
326329 builder . AppendSwitch ( "-fno-strict-aliasing" ) ;
327330
You can’t perform that action at this time.
0 commit comments