Tag: 预处理器指令

如何使用#if来决定在C#中编译哪个平台

在C ++中有预定义的宏: #if defined(_M_X64) || defined(__amd64__) // Building for 64bit target const unsigned long MaxGulpSize = 1048576 * 128;// megabyte = 1048576; const unsigned long MaxRecsCopy = 1048576 * 16; #else const unsigned long MaxGulpSize = 1048576 * 8;// megabyte = 1048576; const unsigned long MaxRecsCopy = 1048576; #endif 这允许我设置常量来控制将使用的内存量。 当然我可以逐字定义预处理器变量: #define Is64bit 1 using […]