Vs2015 64 bit vtk7.1 error handling

Platform:

Win7 64-bit VS2015 VTK7.1

problem 1: link error (almost all functions cannot find their corresponding definitions) :

The reason is that the library (lib) is not well configured.

solution:

1. Item attributes ->; Vc + + directories – & gt; The location where the library directory is added with the corresponding lib

such as: D: \ VTK7.1 \ VTK – bin \ lib \ Debug

2. Connector ->; Input – & gt; Add the required lib (or, like me, all of them) to the dependency, and enter

vtkChartsCore – 7.1. Lib

vtkCommonColor – 7.1. Lib

vtkCommonComputationalGeometry – 7.1. Lib

vtkCommonCore – 7.1. Lib

vtkCommonDataModel – 7.1. Lib

vtkCommonExecutionModel – 7.1. Lib

vtkCommonMath – 7.1. Lib

vtkCommonMisc – 7.1. Lib

vtkCommonSystem – 7.1. Lib

vtkCommonTransforms – 7.1. Lib

vtkDICOMParser – 7.1. Lib

vtkDomainsChemistry – 7.1. Lib

vtkDomainsChemistryOpenGL2-7.1. Lib

vtkFiltersAMR – 7.1. Lib

vtkFiltersCore – 7.1. Lib

vtkFiltersExtraction – 7.1. Lib

vtkFiltersFlowPaths – 7.1. Lib

vtkFiltersGeneral – 7.1. Lib

vtkFiltersGeneric – 7.1. Lib

vtkFiltersGeometry – 7.1. Lib

vtkFiltersHybrid – 7.1. Lib

vtkFiltersHyperTree – 7.1. Lib

vtkFiltersImaging – 7.1. Lib

vtkFiltersModeling – 7.1. Lib

vtkFiltersParallel – 7.1. Lib

vtkFiltersParallelImaging – 7.1. Lib

vtkFiltersProgrammable – 7.1. Lib

vtkFiltersSMP – 7.1. Lib

vtkFiltersSelection – 7.1. Lib

vtkFiltersSources – 7.1. Lib

vtkFiltersStatistics – 7.1. Lib

vtkFiltersTexture – 7.1. Lib

vtkFiltersVerdict – 7.1. Lib

vtkGeovisCore – 7.1. Lib

vtkIOAMR – 7.1. Lib

vtkIOCore – 7.1. Lib

vtkIOEnSight – 7.1. Lib

vtkIOExodus – 7.1. Lib

vtkIOExport – 7.1. Lib

vtkIOGeometry – 7.1. Lib

vtkIOImage – 7.1. Lib

vtkIOImport – 7.1. Lib

vtkIOInfovis – 7.1. Lib

vtkIOLSDyna – 7.1. Lib

vtkIOLegacy – 7.1. Lib

vtkIOMINC – 7.1. Lib

vtkIOMovie – 7.1. Lib

vtkIONetCDF – 7.1. Lib

vtkIOPLY – 7.1. Lib

vtkIOParallel – 7.1. Lib

vtkIOParallelXML – 7.1. Lib

vtkIOSQL – 7.1. Lib

vtkIOVideo – 7.1. Lib

vtkIOXML – 7.1. Lib

vtkIOXMLParser – 7.1. Lib

vtkImagingColor – 7.1. Lib

vtkImagingCore – 7.1. Lib

vtkImagingFourier – 7.1. Lib

vtkImagingGeneral – 7.1. Lib

vtkImagingHybrid – 7.1. Lib

vtkImagingMath – 7.1. Lib

vtkImagingMorphological – 7.1. Lib

vtkImagingSources – 7.1. Lib

vtkImagingStatistics – 7.1. Lib

vtkImagingStencil – 7.1. Lib

vtkInfovisCore – 7.1. Lib

vtkInfovisLayout – 7.1. Lib

vtkInteractionImage – 7.1. Lib

vtkInteractionStyle – 7.1. Lib

vtkInteractionWidgets – 7.1. Lib

vtkLocalExample – 7.1. Lib

vtkNetCDF – 7.1. Lib

vtkNetCDF_cxx – 7.1. Lib

vtkParallelCore – 7.1. Lib

vtkRenderingAnnotation – 7.1. Lib

vtkRenderingContext2D – 7.1. Lib

vtkRenderingContextOpenGL2-7.1. Lib

vtkRenderingCore – 7.1. Lib

vtkRenderingFreeType – 7.1. Lib

vtkRenderingImage – 7.1. Lib

vtkRenderingLOD – 7.1. Lib

vtkRenderingLabel – 7.1. Lib

vtkRenderingOpenGL2-7.1. Lib

vtkRenderingVolume – 7.1. Lib

vtkRenderingVolumeOpenGL2-7.1. Lib

vtkViewsContext2D – 7.1. Lib

vtkViewsCore – 7.1. Lib

vtkViewsInfovis – 7.1. Lib

vtkalglib – 7.1. Lib

vtkexoIIc – 7.1. Lib

vtkexpat – 7.1. Lib

vtkfreetype – 7.1. Lib

vtkglew – 7.1. Lib

vtkhdf5-7.1. Lib

vtkhdf5_hl – 7.1. Lib

vtkjpeg – 7.1. Lib

vtkjsoncpp – 7.1. Lib

vtklibxml2-7.1. Lib

vtkmetaio – 7.1. Lib

vtkmyCommon.lib

vtkmyImaging.lib

vtkmyUnsorted.lib

vtkoggtheora – 7.1. Lib

VTKPNG – 7.1. Lib

vtksqlite – 7.1. Lib

vtksys – 7.1. Lib

vtktiff – 7.1. Lib

vtkverdict – 7.1. Lib

vtkzlib – 7.1. Lib

actually also has the easier way, connector ->; Conventional – & gt; Additional library directory, can be added to the entire folder. (but later tried and found that it did not work, or add it)

problem 2. Runtime error: missing vtkxxx.dll

Solution: The problem is that the environment variables are not configured properly.

Add the corresponding DLL folder in the environment variable PATH, such as my location is D:\VTK7.1\ vtk-res\ bin

Restart VS and run it again without this problem.

question 3. LNK2001
An external symbol that cannot be resolved

“void __cdecl vtkRenderingOpenGL_AutoInit_Construct(void)” (?vtkRenderingOpenGL_AutoInit_Construct@@YAXXZ)

QtVTKhelloworld
E:\code\VTKproject1\QtVTKhelloworld\test.obj

at first I thought it was my opengl installation problem, then looked back to the CMAKE interface,

: VTK_RENDERING_BACKEND
: VTK_RENDERING_BACKEND: OpenGL/OpenGL2

to return to my code, I found my header file declares the VTK_MODULE_INIT (vtkRenderingOpenGL)

then change it to VTK_MODULE_INIT(vtkRenderingOpenGL2) to resolve the error.  

Read More: