[vtkusers] Use VS2005-VTK in VS2008
Mike Jackson
mike.jackson at bluequartz.net
Mon Mar 9 20:54:47 EDT 2009
Some of this will be "well know" to those "in the know" but for the rest
of us here is my quick journey into vtk 5.2.1 with VS 2008 Express.
Create your build directory as usual.
1: Run CMake on the vtk sources as usual.
BUILD_TESTING=OFF
BUILD_SHARED_LIBS=ON
BUILD_EXAMPLES=ON
VTK_USE_GUISUPPORT=ON.
Clicke Configure.
Select VTK_USE_QVTK=ON and VTK_USE_RENDERING=ON.
Click Configure.
Click Generate.
Build vtk using VS 2008. Wait a while till complete.
Find the Cube.exe and launch it from a command prompt. A window will
appear with the 3D cube in it.
Trying to use the "VTK_USE_MFC" will fail because the VS 2008 Express
does not come with the MFC Headers and Libraries and Headers. The build
will fail because it can not find the afxwin.h header file.
I happened to have Qt 4.4.3 installed (I think I built that myself) so I
turned on the Qt support in order to be able to have some sort of
rendering. This turned out to work just fine.
What I did _not_ do to match your installation was all the tcl stuff. I
don't have a tcl/tk installation on this machine so I can not test that
but since I was able to build and run successfully the Cube.cxx example
I think that is enough to show that you can build and run VTK 5.2.1 with
the Visual Studio 2008 Express edition.
Last note: I am downloading the Platform SDK for Windows that one can
install in addition to the visual studio express in order to compile MFC
applications. I have not tried this approach since the Qt approach
worked just fine.
Hope some/all of that helps.
_________________________________________________________
Mike Jackson mike.jackson at bluequartz.net
BlueQuartz Software www.bluequartz.net
Principal Software Engineer Dayton, Ohio
Shakes wrote:
> Hi Guys,
>
> I use VS2008 Express with 5.2.1 on XP/Vista (x64 and x86 versions) fine
> with TCL and MFC OFF and Qt ON. Perhaps a MFC issue?
>
> Cheers
> Shakes
>
> Jim wrote:
>> John and Michael,
>>
>> Thank you for your concerns. As John quoted, I could build VTK 5.2.1
>> and examples on VS 2008 Pro + Windows XP, however, all examples failed
>> to run (no images rendered). However, everything worked fine with
>> VS2005 Standard on the same computer.
>>
>> FYI, I had Wrap_TCL=ON, USE_MFC=ON, USE_QT=ON. Any conflict in my
>> configurations? I will turn off USE_MFC and try it again with VS2008
>> because I will never use MFC.
>>
>> Thank you.
>>
>>
>> --- On *Mon, 3/9/09, John Drescher /<drescherjm at gmail.com>/* wrote:
>>
>> From: John Drescher <drescherjm at gmail.com>
>> Subject: Re: [vtkusers] Use VS2005-VTK in VS2008
>> To: "Michael Jackson" <mike.jackson at bluequartz.net>, "VTK"
>> <vtkusers at vtk.org>
>> Date: Monday, March 9, 2009, 4:08 PM
>>
>> On Mon, Mar 9, 2009 at 6:03 PM, Michael Jackson
>> <mike.jackson at bluequartz.net> wrote:
>> >
>> > On Mar 9, 2009, at 5:21 PM, John Drescher wrote:
>> >
>> >> On Mon, Mar 9, 2009 at 5:17 PM, Jim <jiksed at yahoo.com> wrote:
>> >>>
>> >>> Thank you. John. I would prefer to compile/build my VTK
>> application in
>> >>> VS2008 Pro Edition. My VS2005 is a standard edition which lacks
>> some key
>> >>> features. Will this configuration work fine?
>> >>>
>> >> I have found that you can not mix and match libraries from
>> different
>> >> versions of visual studio in the same project.
>> >>
>> >> John
>> >
>> > I use VS2008 Express with VTK just fine. What problems were you
>> having?
>> >
>> Here is what I can get from the thread about vs2008 problems he
>> was having:
>>
>> I built vtk-5.2.1 and c++
>> examples in VS2008 without any errors. My TCL examples run fine.
>> However, when I ran Arrays.exe or Cube.exe, I didn't see anything
>> rendered on the screen, and no error messages either. I tried both
>> BUILD_SHARED_LIBS=OFF and ON, and I also tried both Debug and Release
>> builds. It didn't make any difference. I am completely lost. Someone
>> please help me out. Thank you.
>>
>> John
>>
More information about the vtkusers
mailing list