Quantcast

Building 64bit vtk on Vista using Visual Studio 2008

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Building 64bit vtk on Vista using Visual Studio 2008

Bogdan-14

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?

 

Thank you,

 

Bogdan

 


_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ

Follow this link to subscribe/unsubscribe:
http://www.vtk.org/mailman/listinfo/vtkusers
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Building 64bit vtk on Vista using Visual Studio 2008

John Drescher-2
On Sun, May 10, 2009 at 10:55 AM, Bogdan Munteanu <[hidden email]> 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
_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ

Follow this link to subscribe/unsubscribe:
http://www.vtk.org/mailman/listinfo/vtkusers
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Building 64bit vtk on Vista using Visual Studio 2008

John Drescher-2
> 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.\
>
I did not say but I did do two Configures and a Generate in
cmake-gui.. Still building. This is on a laptop with a mechanical disk
so it will take some time...


John
_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ

Follow this link to subscribe/unsubscribe:
http://www.vtk.org/mailman/listinfo/vtkusers
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Building 64bit vtk on Vista using Visual Studio 2008

John Drescher-2
On Sun, May 10, 2009 at 12:15 PM, John Drescher <[hidden email]> wrote:
>> 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.\
>>
> I did not say but I did do two Configures and a Generate in
> cmake-gui.. Still building. This is on a laptop with a mechanical disk
> so it will take some time...
>

Result, It built only 1/2 of the projects and does have WIN32 defined.

1>------ Build started: Project: vtksys, Configuration: Debug x64 ------
1>Generating vtksysProcessFwd9xEnc.c
2>------ Build started: Project: vtkRendering, Configuration: Debug x64 ------
2>Generating vtkShadowMapPassShader_vs.cxx, vtkShadowMapPassShader_vs.h
2>The application has failed to start because its side-by-side
configuration is incorrect. Please see the application event log or
use the command-line sxstrace.exe tool for more detail.
2>Project : error PRJ0019: A tool returned an error code from
"Generating vtkShadowMapPassShader_vs.cxx,
vtkShadowMapPassShader_vs.h"
2>Build log was saved at
"file://c:\Programming\VC.90\vtk\Rendering\vtkRendering.dir\Debug\BuildLog.htm"
2>vtkRendering - 1 error(s), 0 warning(s)
1>The application has failed to start because its side-by-side
configuration is incorrect. Please see the application event log or
use the command-line sxstrace.exe tool for more detail.
1>Project : error PRJ0019: A tool returned an error code from
"Generating vtksysProcessFwd9xEnc.c"
1>Build log was saved at
"file://c:\Programming\VC.90\vtk\Utilities\kwsys\vtksys.dir\Debug\BuildLog.htm"
1>vtksys - 1 error(s), 0 warning(s)
3>------ Build started: Project: ProcessShader, Configuration: Debug x64 ------
4>------ Build started: Project: vtkVolumeRendering, Configuration:
Debug x64 ------
4>Generating vtkVolumeTextureMapper3D_TwoDependentShadeFP.cxx,
vtkVolumeTextureMapper3D_TwoDependentShadeFP.h
3>Linking...

From a quick google search this looks like a microsoft problem. I will
attempt to fix this later today..

John
_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ

Follow this link to subscribe/unsubscribe:
http://www.vtk.org/mailman/listinfo/vtkusers
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Building 64bit vtk on Vista using Visual Studio 2008

Bogdan-14
> Result, It built only 1/2 of the projects and does have WIN32 defined.
> ...
> 1>The application has failed to start because its side-by-side
> configuration is incorrect. Please see the application event log or
> use the command-line sxstrace.exe tool for more detail.
> 1>Project : error PRJ0019: A tool returned an error code from
> "Generating vtksysProcessFwd9xEnc.c"
> 1>Build log was saved at
> "file://c:\Programming\VC.90
\vtk\Utilities\kwsys\vtksys.dir\Debug\BuildLog.htm"
> 1>vtksys - 1 error(s), 0 warning(s)
> 3>------ Build started: Project: ProcessShader, Configuration: Debug x64 -----
-
> 4>------ Build started: Project: vtkVolumeRendering, Configuration:
> Debug x64 ------
> 4>Generating vtkVolumeTextureMapper3D_TwoDependentShadeFP.cxx,
> vtkVolumeTextureMapper3D_TwoDependentShadeFP.h
> 3>Linking...

Does this mean it is OK to have WIN32 during cmake configuration?


PS
I forgot to mention that I selected the 64 bit platform when asked by cmake.


John Drescher <drescherjm <at> gmail.com> writes:


_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ

Follow this link to subscribe/unsubscribe:
http://www.vtk.org/mailman/listinfo/vtkusers
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Building 64bit vtk on Vista using Visual Studio 2008

Shakes
In reply to this post by John Drescher-2
Hi Guys,

I've had no problems with building x64 VTK with Cmake 2.6.2, VTK 5.2.1,
Vista Ultimate SP1, MS SDK 6.1.

HTH
Cheers
Shakes

John Drescher wrote:

> On Sun, May 10, 2009 at 12:15 PM, John Drescher <[hidden email]> wrote:
>>> 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.\
>>>
>> I did not say but I did do two Configures and a Generate in
>> cmake-gui.. Still building. This is on a laptop with a mechanical disk
>> so it will take some time...
>>
>
> Result, It built only 1/2 of the projects and does have WIN32 defined.
>
> 1>------ Build started: Project: vtksys, Configuration: Debug x64 ------
> 1>Generating vtksysProcessFwd9xEnc.c
> 2>------ Build started: Project: vtkRendering, Configuration: Debug x64 ------
> 2>Generating vtkShadowMapPassShader_vs.cxx, vtkShadowMapPassShader_vs.h
> 2>The application has failed to start because its side-by-side
> configuration is incorrect. Please see the application event log or
> use the command-line sxstrace.exe tool for more detail.
> 2>Project : error PRJ0019: A tool returned an error code from
> "Generating vtkShadowMapPassShader_vs.cxx,
> vtkShadowMapPassShader_vs.h"
> 2>Build log was saved at
> "file://c:\Programming\VC.90\vtk\Rendering\vtkRendering.dir\Debug\BuildLog.htm"
> 2>vtkRendering - 1 error(s), 0 warning(s)
> 1>The application has failed to start because its side-by-side
> configuration is incorrect. Please see the application event log or
> use the command-line sxstrace.exe tool for more detail.
> 1>Project : error PRJ0019: A tool returned an error code from
> "Generating vtksysProcessFwd9xEnc.c"
> 1>Build log was saved at
> "file://c:\Programming\VC.90\vtk\Utilities\kwsys\vtksys.dir\Debug\BuildLog.htm"
> 1>vtksys - 1 error(s), 0 warning(s)
> 3>------ Build started: Project: ProcessShader, Configuration: Debug x64 ------
> 4>------ Build started: Project: vtkVolumeRendering, Configuration:
> Debug x64 ------
> 4>Generating vtkVolumeTextureMapper3D_TwoDependentShadeFP.cxx,
> vtkVolumeTextureMapper3D_TwoDependentShadeFP.h
> 3>Linking...
>
> From a quick google search this looks like a microsoft problem. I will
> attempt to fix this later today..
>
> John
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ

Follow this link to subscribe/unsubscribe:
http://www.vtk.org/mailman/listinfo/vtkusers
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Building 64bit vtk on Vista using Visual Studio 2008

Bogdan-14
shekharc <Shekhar.Chandra <at> sci.monash.edu.au> writes:

>
> Hi Guys,
>
> I've had no problems with building x64 VTK with Cmake 2.6.2, VTK 5.2.1,
> Vista Ultimate SP1, MS SDK 6.1.
>
> HTH
> Cheers
> Shakes
>

I just worried I had the options wrong for some reason(e.g., all libs had 32
suffix); I continued building anyway, ran some of the examples and the build
seemed OK. Checked the binaries with depends.exe and they looked 64 bit-based.

Thank you,

Bogdan



_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ

Follow this link to subscribe/unsubscribe:
http://www.vtk.org/mailman/listinfo/vtkusers
Loading...