[Insight-users] Error LNK2019: unresolved external symbol

David Doria daviddoria at gmail.com
Thu Jul 12 07:23:56 EDT 2012


On Thu, Jul 12, 2012 at 4:41 AM, jay chen <jaychen1116 at gmail.com> wrote:
>
> Dear experts:
>
>         How are you?  I am trying an example of displaying a 2D image
> by linking ITK (InsightToolkit-4.1.0) and VTK(vtk-5.10.0).  The CMake
> version I downloaded is cmake-2.8.8-win32-x86.  The error message I
> got is as follows:
>
> myProject.obj : error LNK2019:unresolved external symbol "public: void
> __thiscall vtkImageViewer::SetupInteractor(class
> vtkRenderWindowInteractor *)"
>
>        Could someone tell me how to fix the error?  Thank you so much.
>
>                                     Best Regards
>                                     Jay Chen


Did you find and link to VTK in your project?

find_package(VTK REQUIRED)
include(${VTK_USE_FILE})

and

 target_link_libraries(YourProject ${ITK_LIBRARIES} ${VTK_LIBRARIES})


David


More information about the Insight-users mailing list