How to generate 64 bit binaries?
Hi, I need help.
I have some question:
1. can we generate 64 bit binaries(executable) files using 32 bit windows?
2. if can, I have compiled my program use vc.net. the binaries file is still on 32 bit. how can I make it 64 bit? is there any document on the web related to this issue?
please help.
Thanks very much
[342 byte] By [
winkie] at [2007-12-16]
Yes you can build 64-bit binaries on a 32-bit machine by using the /platform compiler switch or the Build pane in the project designer. The documentation for the /platform option in C# says this (the info is also applicable to other languages).
The /platform option specifies which version of the common language runtime (CLR) can run the assembly.
/platform:string
Parameters
string
x86, Itanium, x64, or anycpu (default).
Remarks
x86 compiles your assembly to be run by the 32-bit, x86-compatible common language runtime.
Itanium compiles your assembly to be run by the 64-bit common language runtime on a computer with an Itanium processor.
x64 compiles your assembly to be run by the 64-bit common language runtime on a computer that supports the AMD64 or EM64T instruction set.
anycpu (default) compiles your assembly to run on any platform.
On a 64-bit Windows operating system:
- Assemblies compiled with /platform:x86 will execute on the 32 bit CLR running under WOW64.
- Executables compiled with the /platform:anycpu will execute on the 64 bit CLR.
- DLLs compiled with the /platform:anycpu will execute on the same CLR as the process into which it is being loaded.
For more information about developing an application to run on a Windows 64-bit operating system, see 64-bit Applications.
To set this compiler option in the Visual Studio development environment
Open the Properties page for the project. For details, see How to: Set Project Properties (C#, J#).
Click the Build property page.
Modify the Platform target property.