[CMake] Cross compiling for Windows x64/amd64 on 32-bit Windows

David Cole david.cole at kitware.com
Tue Oct 2 06:52:22 EDT 2012


On Tue, Oct 2, 2012 at 5:30 AM, Arindam Mukherjee <
arindam.mukerjee at gmail.com> wrote:

> On Tue, Oct 2, 2012 at 2:48 AM, Xavier Besseron <xavier.besseron at uni.lu>
> wrote:
> > Hi,
> >
> > I was able to build win64 executable on my 32-bit Windows.
> >
> > First, I had to make the "full installation" of VS 2008 (the "default
> > installation" did not provide the win64 compiler in my case). Then, I
> > had to select the "Visual Studio 9 2008 Win64" generator in CMake. And
> > the project built correctly.
> >
> > However, it is not possible to execute the generated binaries on a
> > 32-bit Windows.
> >
> >
>
> Thanks! That works perfectly. From a driver batch script, I now use:
>
> cmake -G "Visual Studio 9 2008 Win32" src_dir
>
> and:
>
> cmake -G "Visual Studio 9 2008 Win64" src_dir
>
> This, I guess, should work even if I move to a 64-bit build machine.
>
> Thanks again.
> Arindam
> --
>
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the CMake FAQ at:
> http://www.cmake.org/Wiki/CMake_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.cmake.org/mailman/listinfo/cmake
>


cmake -G "Visual Studio 9 2008 Win32" src_dir

will not work. There is no such generator. Leave out the " Win32" for this
case... it is implied.


HTH,
David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20121002/7d4d9477/attachment.htm>


More information about the CMake mailing list