Windows 64-bit program compilation and detection
1, 64-bit program compilation
The use of vs2010 can be more convenient to compile a 64-bit program.
Adjust the compilation configuration to x64.
The configuration is complete and the compiled program is 64 bits.
2, 64-bit program detection
Detects if a program is 64-bit and can be used with the DUMPBIN tool, which is a small tool that comes with vs.
The steps are as follows.
The corresponding commands are in turn:
Go to VC directory: cd D:\Program Files\Microsoft Visual Studio 10.0\VC
Configuring the VC command environment: Vcvarsall.bat
Detects if EXE is 64-bit: Dumpbin/headers f:\win64test.exe>f:\1.txt
The results of the run are output to f:\1.txt, and the results can be found to be 64-bit programs.
3, 64-bit program operation
64-bit program 64-bit system running normally, on 32-bit system running 64-bit program error is as follows.