且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

编程的32位环境VS编程的64位环境/编译配置

更新时间:2021-09-20 02:31:15

可以有怎样的code被写入的差异,但有一点照顾最code是pretty的容易写所以它编译和运行细无论是作为32位或64位可执行文件。如果你不喜欢的东西的Windows类型之间的假设相似性( - 32位code真实的,但不是在64位code,例如,一个DWORD将举行一个指针)时,大多数问题出现/。

There can be differences in how the code is written, but with a bit of care most code is pretty easy to write so it compiles and runs fine as either a 32-bit or 64-bit executable. Most of the problems arise when/if you do things like assuming similarity between Windows types (e.g., that a DWORD will hold a pointer -- true in 32-bit code but not in 64-bit code).

另外请注意,在32位编译器的最后几个迭代都产生了警告,你可以启用code表示不会移植到64位执行(这似乎pretty的有效和准确)

Also note that the last few iterations of the 32-bit compiler have had a warning you could enable for code that wouldn't port to 64-bit execution (and it seems pretty effective and accurate).