[vtkusers] VTK text does not display in release mode - VS 2008

John Drescher drescherjm at gmail.com
Mon Mar 19 08:06:25 EDT 2012


> I am using vtk in visual studio 2008, with c++.
> I have built the vtk source in release mode.
> When I run the application in debug mode, the text of vtk render window (the
> text are legend of a vtk xy chart and the text of vtk scalar bar) is not
> displayed.
> Text is shown only in the debug mode.
> Could anyone tell me the reason for that?
> I am quite new to VTK.
>

Did you have vtk build dlls then install VTK using the release mode
and then try to use your application in Debug mode? If all are true
problems like this are expected. In Visual Studio you can not safely
mix Debug mode and Release mode. Your application and all of its dlls
must be all in Release mode or all in Debug mode. I would suggest to
turn off the dll generation in vtk (BUILD_SHARED) so that vtk compiles
statically. Or do not use the INSTALL target of vtk instead when you
configure your own application using CMake set VTK_DIR to the folder
containing vtk.sln. In this case you will have to manually copy the
vtk .dlls to your Bin\debug and Bin\Release .. folders. Make sure you
copy the Release dlls for release and the Debug dlls for Debug.

John



More information about the vtkusers mailing list