<div dir="ltr">When I try to generate the nmake build, CMake (2.6) reports the following error:<br><br><div style="margin-left: 40px;">LINK : warning LNK4012: invalid value &#39;x64&#39;, must be &#39;AM33, AMD64, ARM,&nbsp; CEE, EBC, IA64, M32R, MIPS, MIPS16, IPSFPU, MIPSFPU16, MIPSR41XX, SH4,&nbsp; SH5, THUMB, or X86&#39;; option ignored<br>
<br></div><br>Here is the complete log:<br><br>-- The C compiler identification is MSVC<br>-- The CXX compiler identification is MSVC<br>-- Check for working C compiler: C:/Program Files/Microsoft Platform SDK for Windows Server 2003 R2/<br>

Bin/win64/x86/AMD64/cl.exe<br>
-- Check for working C compiler: C:/Program Files/Microsoft Platform SDK for Windows Server 2003 R2/<br>Bin/win64/x86/AMD64/cl.exe -- broken<br>CMake Error at C:/Program Files (x86)/CMake 2.6/share/cmake-2.6/Modules/CMakeTestCCompiler.cmake:32<br>


(MESSAGE):<br>&nbsp; The C compiler &quot;C:/Program Files/Microsoft Platform SDK for Windows Server<br>&nbsp; 2003 R2/Bin/win64/x86/AMD64/cl.exe&quot; is not able to compile a simple test<br>&nbsp; program.<br><br>&nbsp; It fails with the following output:<br>


<br>&nbsp;&nbsp; Change Dir: C:/Program Files (x86)/CMake 2.6/CMakeFiles/CMakeTmp<br><br><br><br>&nbsp; Run Build Command:nmake /NOLOGO &quot;cmTryCompileExec\fast&quot;<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; nmake -f CMakeFiles\cmTryCompileExec.dir\build.make /nologo -L<br>


&nbsp; CMakeFiles\cmTryCompileExec.dir\build<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot;C:\Program Files (x86)\CMake 2.6\bin\cmake.exe&quot; -E cmake_progress_report<br>&nbsp; &quot;C:\Program Files (x86)\CMake 2.6\CMakeFiles\CMakeTmp\CMakeFiles&quot; 1<br>


<br>&nbsp; Building C object CMakeFiles/cmTryCompileExec.dir/testCCompiler.c.obj<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; C:\PROGRA~1\MI9547~1\Bin\win64\x86\AMD64\cl.exe<br>&nbsp; @C:\Users\lp\AppData\Local\Temp\nm7C35.tmp<br><br>&nbsp; testCCompiler.c<br><br>&nbsp; Linking C executable cmTryCompileExec.exe<br>


<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot;C:\Program Files (x86)\CMake 2.6\bin\cmake.exe&quot; -E vs_link_exe<br>&nbsp; C:\PROGRA~1\MI9547~1\Bin\win64\x86\AMD64\cl.exe /nologo<br>&nbsp; @CMakeFiles\cmTryCompileExec.dir\objects.rsp<br>&nbsp; @C:\Users\lp\AppData\Local\Temp\nm7CA3.tmp<br>


<br>&nbsp; LINK : warning LNK4012: invalid value &#39;x64&#39;, must be &#39;AM33, AMD64, ARM,<br>&nbsp; CEE, EBC, IA64, M32R, MIPS, MIPS16, MIPSFPU, MIPSFPU16, MIPSR41XX, SH4,<br>&nbsp; SH5, THUMB, or X86&#39;; option ignored<br><br>&nbsp; LINK : warning LNK4068: /MACHINE not specified; defaulting to X86<br>


<br>&nbsp; CMakeFiles\cmTryCompileExec.dir\testCCompiler.c.obj : fatal error LNK1112:<br>&nbsp; module machine type &#39;AMD64&#39; conflicts with target machine type &#39;X86&#39;<br><br>&nbsp; LINK Pass 1 failed.&nbsp; with 2<br><br>&nbsp; NMAKE : fatal error U1081: &#39;C:\Windows\system32\cmd.exe&#39; : program not<br>


&nbsp; found<br><br>&nbsp; Stop.<br><br>&nbsp; NMAKE : fatal error U1077: &#39;&quot;C:\Program Files\Microsoft Platform SDK for<br>&nbsp; Windows Server 2003 R2\Bin\nmake.exe&quot;&#39; : return code &#39;0x2&#39;<br><br>&nbsp; Stop.<br><br><br>


<br><br><br>&nbsp; CMake will not be able to correctly generate this project.<br>Call Stack (most recent call first):<br>&nbsp; CMakeLists.txt:5 (PROJECT)<br><br><br>-- Configuring incomplete, errors occurred!<br><br><br><div class="gmail_quote">

On Fri, Oct 3, 2008 at 5:21 PM, David Partyka <span dir="ltr">&lt;<a href="mailto:dave.partyka@kitware.com" target="_blank">dave.partyka@kitware.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">








<div link="blue" vlink="purple" lang="EN-US">

<div>

<p><span style="font-size: 11pt; color: rgb(31, 73, 125);">You could probably generate an nmake build and then use the
platform SDK to compile 64bit from the command line. You wouldn&#39;t be able
to use VS2003 to debug your 64 bit build though. If you want to use the IDE to
debug I think the simplest thing would be to upgrade to either VS 2005 or VS
2008 which has built in 64bit support.</span></p>

<p><span style="font-size: 11pt; color: rgb(31, 73, 125);">&nbsp;</span></p>

<div style="border-style: solid none none; border-color: rgb(181, 196, 223) -moz-use-text-color -moz-use-text-color; border-width: 1pt medium medium; padding: 3pt 0in 0in;">

<p><b><span style="font-size: 10pt;">From:</span></b><span style="font-size: 10pt;">
<a href="mailto:vtkusers-bounces@vtk.org" target="_blank">vtkusers-bounces@vtk.org</a> [mailto:<a href="mailto:vtkusers-bounces@vtk.org" target="_blank">vtkusers-bounces@vtk.org</a>] <b>On Behalf Of </b>Laurent
Peters<br>
<b>Sent:</b> Friday, October 03, 2008 11:12 AM<br>
<b>To:</b> <a href="mailto:vtkusers@vtk.org" target="_blank">vtkusers@vtk.org</a><br>
<b>Subject:</b> [vtkusers] Windows 64 bits compilation with Visual Studio .net
2003</span></p>

</div><div><div></div><div>

<p>&nbsp;</p>

<div>

<p>I usually compile my code for 64 bits Windows using
Microsoft Visual Studio .net 2003 and Microsoft Platform SDK for Windows Server
2003.<br>
I tried to compile VTK 5.2 for 64 bits Windows with the same tools.<br>
<br>
Compilation fails because CMake automatically adds the flag /MACHINE:I386 to
the linker options,<br>
which conflicts with the /MACHINE:amd64 flag that I specified in CMake.<br>
<br>
Is there a way to avoid that CMake adds this /MACHINE:I386 flag? I did not find
one.<br>
Do I need to upgrade to the latest version of Microsoft Visual Studio, for
which 64 bits compilation of VTK seems straightforward?<br>
Are there some instructions available to compile with these tools?<br>
<br>
Thanks,<br>
Laurent<span style="font-size: 8pt; color: black;"><br>
<br>
</span></p>

<p>&nbsp;</p>

</div>

</div></div></div>

</div>


</blockquote></div><br></div>