vtkScalarBarActor New macro problem


I am using QtCreator to make a vtk App. I wanted to make a section of the app that shows the vtkScalarBarActor so the USER can get a feeling for the colors their going to use for their state plot.

I have two lines in the showEvent handler for the QVTKOpenGLWidget were the color bar will live:
vtkSmartPointer lut = vtkSmartPointer::New();
vtkSmartPointer bar = vtkSmartPointer::New();

So there is no problem with the vtkLookupTable. But the vtkScalarBarActor throws the following:

/usr/local/vtk-8/include/vtk-8.2/vtkSmartPointer.h:155: error: undefined reference to `vtkScalarBarActor::New()’

Any ideas? Any help is greatly appreciated.

I am sorry I forgot the first part of the error:
/home/rmoral/Documents/dev/Qt/build-igvnapp-Desktop-Debug/igcolorbarviewer.o:-1: In function `vtkSmartPointer::New()’:

Thank you again.

vtkScalarBarActor::New() is defined in the vtkRenderingAnnotation library – make sure you’ve linked this library to your application.