# Compilation issue after migrating to VTK-8.2

**URL:** https://discourse.vtk.org/t/compilation-issue-after-migrating-to-vtk-8-2/2082
**Category:** Support
**Created:** [November 11, 2019, 3:21pm UTC](https://discourse.vtk.org/t/compilation-issue-after-migrating-to-vtk-8-2/2082 "2019-11-11T15:21:02Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![efourkal](https://discourse.vtk.org/user_avatar/discourse.vtk.org/efourkal/32/7461_2.png) [@efourkal](https://discourse.vtk.org/u/efourkal)
#### Post date: [November 11, 2019, 3:21pm UTC](https://discourse.vtk.org/t/compilation-issue-after-migrating-to-vtk-8-2/2082/1 "2019-11-11T15:21:02Z")

</div>

I have a research code that uses VTK-5.2 for visualization. In my Makefile I link specific VTK libraries for compilation. After installing VTK-8.2, the program does not compile. How do I need to change the Makefile to make things work with VTK-8.2 . Thank you

---

<div class="post-metadata">

### Author: ![cory.quammen](https://discourse.vtk.org/user_avatar/discourse.vtk.org/cory.quammen/32/6751_2.png) [@cory.quammen](https://discourse.vtk.org/u/cory.quammen)
#### Post date: [November 11, 2019, 3:29pm UTC](https://discourse.vtk.org/t/compilation-issue-after-migrating-to-vtk-8-2/2082/2 "2019-11-11T15:29:37Z")

</div>

That is a lot of major versions to upgrade all at once 🙂 There is no upgrade guide or person who can tell you exactly what to do, I’m afraid. It will take some time to work through, so you’ll need some patience.

If your project is simple, there probably isn’t too much to change. I suggest reporting errors one at a time in this topic as you come across them and folks may be able to chime in and tell you how to resolve specific errors.

---

<div class="post-metadata">

### Author: ![efourkal](https://discourse.vtk.org/user_avatar/discourse.vtk.org/efourkal/32/7461_2.png) [@efourkal](https://discourse.vtk.org/u/efourkal)
#### Post date: [November 11, 2019, 3:47pm UTC](https://discourse.vtk.org/t/compilation-issue-after-migrating-to-vtk-8-2/2082/3 "2019-11-11T15:47:08Z")

</div>

Thanks Cory for the suggestion. The code I use is not that big. For version 5.10 I linked --lvtkIO -lvtkRendering -lvtkGraphics -lvtkzlib -lvtkFiltering -lvtkCommon. VTKGraphics and vtkzlib are not in 8.2. The following errors I get during the compilation:

Undefined symbols for architecture x86\_64:  
“vtkPolyData::New()”, referenced from:  
vtkSmartPointer::New() in cccaFLWd.o

It looks like I need to add some libraries to the makefile but I do not know which ones

---

<div class="post-metadata">

### Author: ![cory.quammen](https://discourse.vtk.org/user_avatar/discourse.vtk.org/cory.quammen/32/6751_2.png) [@cory.quammen](https://discourse.vtk.org/u/cory.quammen)
#### Post date: [November 11, 2019, 4:38pm UTC](https://discourse.vtk.org/t/compilation-issue-after-migrating-to-vtk-8-2/2082/4 "2019-11-11T16:38:53Z")

</div>

To figure this out, you can head over to the VTK doxygen documentation, search for the class that the linker is complaining about, click on it, scroll to the bottom of the class documentation page, and figure out the library needed.

For `vtkPolyData`, go to its [documentation page](https://vtk.org/doc/nightly/html/classvtkPolyData.html) and scroll to the bottom. The file is located in `Common/DataModel/vtkPolyData.h`. Append `Common` and `DataModel` together, prefix it with `libvtk`, and you’ll get the required library `libvtkCommonDataModel`.

Do this for all such linker errors and you should have the libraries you need.

You can also figure this out with a Python utility script `FindNeededModules.py` written by @amaclean which is located in the VTK source code in `Utilities/Maintenance/`. Documentation on how to use the script is in comments in the script.

---

<div class="post-metadata">

### Author: ![efourkal](https://discourse.vtk.org/user_avatar/discourse.vtk.org/efourkal/32/7461_2.png) [@efourkal](https://discourse.vtk.org/u/efourkal)
#### Post date: [November 11, 2019, 4:59pm UTC](https://discourse.vtk.org/t/compilation-issue-after-migrating-to-vtk-8-2/2082/5 "2019-11-11T16:59:00Z")

</div>

Thanks for the suggestion!
