5YrsLaterDBA
5YrsLaterDBA

Reputation: 34800

can I generate VC++ 64bit application on my 32bit XP machine?

I have read few pages about 32-bit and 64-bit application but I am still not clear if I can build a VC++ application which target on 64-bit machine with my VS2008 on my 32bit XP machine? Those pages are : http://msdn.microsoft.com/en-us/library/x4d2c09s(v=VS.90).aspx

http://msdn.microsoft.com/en-us/library/9yb4317s(v=VS.90).aspx

They said by using 64-bit compiler, we can build an application to run on 64-bit machine. But I cannot find anywhere tells me if I can install that 64-bit compiler on my 32bit XP machine.

Upvotes: 0

Views: 124

Answers (3)

Hans Passant
Hans Passant

Reputation: 942089

Yes, when you install the 64-bit compilers for C++ (custom install required) then you'll get three compilers in the vc\bin directory:

  • vc\bin\cl.exe: a 32-bit compiler that generates 32-bit machine code
  • vc\bin\x86_amd64\cl.exe: a 32-bit compiler that generates 64-bit machine code
  • vc\bin\amd64\cl.exe: a 64-bit compiler that generates 64-bit machine code.

The 2nd compiler is the default choice for a x64 project, it has no trouble running on a 32-bit install of XP. Do note however that you have no way to actually test or debug the generated program. Which makes it only practical in a build server scenario.

Upvotes: 2

WebMonster
WebMonster

Reputation: 3031

I think there is no reason not to be able to install a 64 bit compiler. The thing what you want to do is called cross compilation, and is done regurarly on embedded platforms (lacking keyboard, even display some times). You might need to download the compiler separately though.

You could set it there: settings pane

Upvotes: 1

Tom W
Tom W

Reputation: 5412

The very first note in your second link says:

"64-bit tools are not available on Visual C++ Express by default. To enable 64-bit tools on Visual C++ Express, install the Windows Software Development Kit (SDK) in addition to Visual C++ Express. Otherwise, an error occurs when you attempt to configure a project to target a 64-bit platform using Visual C++ Express."

Am I missing something, or does this answer your question?

Upvotes: 0

Related Questions