[vtkusers] Building 64bit vtk on Vista using Visual Studio 2008

John Drescher drescherjm at gmail.com
Sun May 10 12:08:09 EDT 2009


On Sun, May 10, 2009 at 10:55 AM, Bogdan Munteanu <bogdan.indy at gmail.com> wrote:
> I am trying to build the 64 bit version of vtk on Windows. I am using:
>
>
>
> - vtk 5.4.0
>
> - cmake 2.6.4
>
> - Visual Studio Team System 2008 SP1
>
> - Windows Vista Ultimate with Service Pack 1
>
>
>
> In a cmd window I set up the environment for a 64 bit build using:
>
> "C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\vcvarsall.bat" amd64
>
>
>
> ,after which I launched cmake (GUI version).
>
>
>
> After running config in cmake I got the following set of options:
>
>
>
> CMAKE_CXX_COMPILER             - C:/Program Files (x86)/Microsoft Visual
> Studio 9.0/VC/bin/amd64/cl.exe
>
> CMAKE_CXX_FLAGS                - /DWIN32 /D_WINDOWS /W3 /Zm1000 /EHsc /GR
>
> CMAKE_CXX_FLAGS_DEBUG          - /D_DEBUG /MDd /Zi /Ob0 /Od /RTC1
>
> CMAKE_CXX_FLAGS_MINSIZEREL     - /MD /O1 /Ob1 /D NDEBUG
>
> CMAKE_CXX_FLAGS_RELEASE        - /MD /O2 /Ob2 /D NDEBUG
>
> CMAKE_CXX_FLAGS_RELWITHDEBINFO - /MD /Zi /O2 /Ob1 /D NDEBUG
>
> CMAKE_CXX_STANDARD_LIBRARIES   - kernel32.lib user32.lib gdi32.lib
> winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib
> advapi32.lib
>
> CMAKE_C_COMPILER               - C:/Program Files (x86)/Microsoft Visual
> Studio 9.0/VC/bin/amd64/cl.exe
>
> CMAKE_C_FLAGS                  - /DWIN32 /D_WINDOWS /W3 /Zm1000
>
> CMAKE_C_FLAGS_DEBUG            - /D_DEBUG /MDd /Zi  /Ob0 /Od /RTC1
>
> CMAKE_C_FLAGS_MINSIZEREL       - /MD /O1 /Ob1 /D NDEBUG
>
> CMAKE_C_FLAGS_RELEASE          - /MD /O2 /Ob2 /D NDEBUG
>
> CMAKE_C_FLAGS_RELWITHDEBINFO   - /MD /Zi /O2 /Ob1 /D NDEBUG
>
> CMAKE_C_STANDARD_LIBRARIES     - kernel32.lib user32.lib gdi32.lib
> winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib
> advapi32.lib
>
> CMAKE_EXE_LINKER_FLAGS         - /MANIFEST /STACK:10000000 /machine:x64
>
> CMAKE_C_FLAGS_DEBUG            - /debug /INCREMENTAL:YES
>
> CMAKE_C_FLAGS_MINSIZEREL       - /INCREMENTAL:NO
>
> CMAKE_C_FLAGS_RELEASE          - /INCREMENTAL:NO
>
> CMAKE_C_FLAGS_RELWITHDEBINFO   - /debug /INCREMENTAL:YES
>
>
>
> It looks like cmake picks up properly the 64 bit compiler and linker (i.e.,
> cl.exe in amd64 folder) but the compilation/link flags look like targeting a
> 32 bit platform (e.g., the platform constant is WIN32, while I would have
> expected WIN64) and all .lib files specify the 32 bit version.
>
>
>
> Is there something I am missing here?
>


I just opened up cmake-gui and selected Visual Studio 9 WIN64 and then
opened the solution in VS2008 and compiled. It is building for x64
right now but did not finish yet.\

John



More information about the vtkusers mailing list