Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Producing 64 bit executable on a 32 bit OS

I am working on a 32 bit Windows XP OS in C++. But I have to build an executable for 64 bit Windows 7 OS. How should I go about doing it? I don't want to run the executable, I just want to produce it. Also, if it is necessary to know the processors also, please ask me.

I read a little about it in these sites, cross compiling for x64 and msdn article on cross compiling. But I am unable to understand many things in it. Can anyone expalin me step by step how to go about with this.

In addition to this, can anybody tell me what is cmake? Also is it possible to check whether I have full installation of Visual studio or the default installation after the installation is over.

like image 347
Prasad Avatar asked Feb 13 '13 07:02

Prasad


1 Answers

If you are using Visual Studio, it's simply a matter of configuring linker to build code for 64-bit processor.

Open project properties and choose Configuration properties | Linker | Advanced and switch Target Machine to MachineX64.

Alternatively, you can add new build platform, IDE will configure these options for you. Open Configuration Manager, choose your project, and on the Platform column choose <New...>. Then choose 64-bit processor.

like image 64
Spook Avatar answered Sep 28 '22 07:09

Spook