[vtkusers] VS 2010 64-bit build problems

Fahlgren, Eric eric.fahlgren at smith-nephew.com
Fri Aug 9 12:44:07 EDT 2013


David,

I created a new install, ran my little "build.bat" and got the right value back on first configuration.  At this point I strongly suspect user error, I probably set something incorrectly when setting up the environment the first time (maybe I selected the Cygwin compilers inadvertently, then switched to VS?).

Thanks for the help,
Eric

Just for posterity, here's the bat file that ensures I'm running 64 in this directory.

if not exist "%PROGRAMFILES%\Microsoft Visual Studio 10.0\VC\vcvarsall.bat" goto missing
call "%PROGRAMFILES%\Microsoft Visual Studio 10.0\VC\vcvarsall.bat" amd64

if "%1" == "1" (
   "%PROGRAMFILES%/CMake 2.8/bin/cmake-gui.exe"
) else (
   cd build
   NMake %1
)

goto :eof

:missing
echo Missing file
echo "%PROGRAMFILES%\Microsoft Visual Studio 10.0\VC\vcvarsall.bat"
goto :eof


> -----Original Message-----
> From: David Cole [mailto:dlrdave at aol.com]
> Sent: Friday, August 09, 2013 04:10
> To: Fahlgren, Eric; vtkusers at vtk.org
> Subject: Re: [vtkusers] VS 2010 64-bit build problems
> 
> > I diffed the CMakeCache.txt files between my 32- and 64-bit builds,
> and noted
> > that the explicit templates flag was 0 in the 64.  I changed it to 1,
> and what
> > do you know?  Builds fine now without any code changes.
> >
> > VTK_EXPLICIT_TEMPLATES:INTERNAL=1
> >
> > This flag is not exposed in the CMake gui, so I have no idea how it
> got set
> > incorrectly.  Anyone got an explanation?
> 
> 
> That flag is set during the first CMake configure run by an internal
> "try_compile" test. It's marked as type "INTERNAL" meaning it cannot be
> set by the cmake user in cmake-gui. The source code for it is in the
> file CMake/vtkTestExplicitInstantiation.cmake.
> 
> The test is simply supposed to determine if the compiler can handle
> using explicit template instantiations, and it looks like a pretty
> simple test (just glancing at the source code).
> 
> So the question is: why did the CMake configure process get that answer
> wrong on the first time you did a CMake configure for 64-bits...?
> 
> Can you reproduce this result in a fresh build tree?
> 
> (i.e. -- if you start over with an empty VTK build tree, and run CMake
> configure just once with the 64-bit settings.... do you get the right
> value for VTK_EXPLICIT_TEMPLATES in the cache? Or does the incorrect
> value occur again?)
> 
> 
> HTH,
> D




More information about the vtkusers mailing list