<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 'x64', must be 'AM33, AMD64, ARM, CEE, EBC, IA64, M32R, MIPS, MIPS16, IPSFPU, MIPSFPU16, MIPSR41XX, SH4, SH5, THUMB, or X86'; 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> The C compiler "C:/Program Files/Microsoft Platform SDK for Windows Server<br> 2003 R2/Bin/win64/x86/AMD64/cl.exe" is not able to compile a simple test<br> program.<br><br> It fails with the following output:<br>
<br> Change Dir: C:/Program Files (x86)/CMake 2.6/CMakeFiles/CMakeTmp<br><br><br><br> Run Build Command:nmake /NOLOGO "cmTryCompileExec\fast"<br><br> nmake -f CMakeFiles\cmTryCompileExec.dir\build.make /nologo -L<br>
CMakeFiles\cmTryCompileExec.dir\build<br><br> "C:\Program Files (x86)\CMake 2.6\bin\cmake.exe" -E cmake_progress_report<br> "C:\Program Files (x86)\CMake 2.6\CMakeFiles\CMakeTmp\CMakeFiles" 1<br>
<br> Building C object CMakeFiles/cmTryCompileExec.dir/testCCompiler.c.obj<br><br> C:\PROGRA~1\MI9547~1\Bin\win64\x86\AMD64\cl.exe<br> @C:\Users\lp\AppData\Local\Temp\nm7C35.tmp<br><br> testCCompiler.c<br><br> Linking C executable cmTryCompileExec.exe<br>
<br> "C:\Program Files (x86)\CMake 2.6\bin\cmake.exe" -E vs_link_exe<br> C:\PROGRA~1\MI9547~1\Bin\win64\x86\AMD64\cl.exe /nologo<br> @CMakeFiles\cmTryCompileExec.dir\objects.rsp<br> @C:\Users\lp\AppData\Local\Temp\nm7CA3.tmp<br>
<br> LINK : warning LNK4012: invalid value 'x64', must be 'AM33, AMD64, ARM,<br> CEE, EBC, IA64, M32R, MIPS, MIPS16, MIPSFPU, MIPSFPU16, MIPSR41XX, SH4,<br> SH5, THUMB, or X86'; option ignored<br><br> LINK : warning LNK4068: /MACHINE not specified; defaulting to X86<br>
<br> CMakeFiles\cmTryCompileExec.dir\testCCompiler.c.obj : fatal error LNK1112:<br> module machine type 'AMD64' conflicts with target machine type 'X86'<br><br> LINK Pass 1 failed. with 2<br><br> NMAKE : fatal error U1081: 'C:\Windows\system32\cmd.exe' : program not<br>
found<br><br> Stop.<br><br> NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Platform SDK for<br> Windows Server 2003 R2\Bin\nmake.exe"' : return code '0x2'<br><br> Stop.<br><br><br>
<br><br><br> CMake will not be able to correctly generate this project.<br>Call Stack (most recent call first):<br> 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"><<a href="mailto:dave.partyka@kitware.com" target="_blank">dave.partyka@kitware.com</a>></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'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);"> </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> </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> </p>
</div>
</div></div></div>
</div>
</blockquote></div><br></div>