[ITK-users] Target Machine type error when trying to build 64-bit ITK using VS2015

Evan Kao tossin at gmail.com
Wed Jul 20 19:09:53 EDT 2016


Hello all,

This may be more of a Visual Studio issue than an ITK issue, but I was
wondering if anyone else found a way around this.  I'm trying to build ITK
4.10.0 on a Windows 7 64-bit machine with Python (2.7 64-bit) wrapping
using Visual Studio 2015.  I should add I'm not familiar with either CMake,
ITK, or Visual Studio so I could be missing something obvious.

I keep getting the following error for multiple *.obj files:
x64\Release\*.obj : fatal error LNK1112: module machine type 'x64'
conflicts with target machine type 'X86'

I noticed that CMake generates vxproj files for only Win32 by default.
Then the files are modified by Visual Studio when switching the platform to
x64 and selecting "Clean Solution", which adds the following lines, among
others:
    <ProjectConfiguration Include="Release|x64">
      <Configuration>Release</Configuration>
      <Platform>x64</Platform>

However, many individual sub-projects are still not updated to account for
x64 configurations.  I took a look at the Advanced CMAKE variables in the
CMake GUI, but had no idea what to modify (everything seems to target
Win32).

Is there a way to configure CMake to generate x64 files?  If not, does
anyone know how to correctly configure ITK on x64 platforms in VS2015?

Thanks,
Evan Kao
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/insight-users/attachments/20160720/17db965e/attachment.html>


More information about the Insight-users mailing list