- Modify the .sln/.vcxproj file yourself by text editor to allow
$(Platform) == CHPE. - Download EWDK.
- Open Visual Studio through
SetupVSEnvin EWDK environment. - Open modified .sln or .vcxproj from SetupVSEnv-ed VS. (Don't open from explorer)
- Make additional project settings.
- [MUST] Remove
odbccp32.libfromLinker->Input->Additional Dependencies. It's not exist. - [MUST] Set the
General->Windows SDK Versionto$(Version_Number). The EWDK environment use discrete Windows SDK. - [MAY] Change
General->Platform Toolset. - [I Recommend] Change
General->Output DirectoryandIntermediate Directory. By default it mixes with x86. - [For DEBUG] Disable
C/C++->Optimization->Optimization. The default value is on. - [For DEBUG] Change
C/C++->General->Debug Information Formatto other thanProgram Database for Edit And Continue.Control Flow Guardcannot be turned off. - [For DEBUG] Disable
C/C++->General->Support Just My Code Debugging. If do not turn it off, will get an internal compiler error. - [For DLL] Disable
Advanced->Whole Program Optimizationor Add/NOIMPLIBtoLinker->Command Line->Additional Options. If do not, will getLINK : fatal error LNK1376: /DLL and /WOWA64 are incompatible when producing an import library. Generate the import library separately.
- [MUST] Remove
| X86 | X64 | CHPE (x86) |
CHPE (ARM64) |
ARM64 | ARM64EC | |
|---|---|---|---|---|---|---|
| _M_IX86 | defined | defined | defined | |||
| _M_X64 _M_AMD64 |
defined | defined | ||||
| _M_HYBRID | defined | defined | ||||
| _M_HYBRID_X86 | defined | |||||
| _M_HYBRID_X86_ARM64 | defined | |||||
| _M_ARM64 | defined | |||||
| _M_ARM64EC | defined | |||||
| _WIN64 | defined | defined | defined |
| X86 | X64 | CHPE (x86) |
CHPE (ARM64) |
ARM64 | ARM64EC | |
|---|---|---|---|---|---|---|
| _CHPE_ _CHPE_X86_ARM64_ i386 _X86_ |
defined | defined | ||||
| ARM64EC _ARM64EC_ AMD64 _AMD64_ |
defined |
CHPE is compiled twice. As x86, and as ARM64. X86 is used for parts that could not be compiled as ARM64 on a function-by-function (such as containg inline assembler or intrinsic function).