[vtkusers] Compiling error: VTK not found

Amy Squillacote amy.squillacote at kitware.com
Thu Aug 2 09:43:25 EDT 2007


Hi Dzung,

Did you run ccmake before you tried to build the Cone.cxx example? If 
not, do that. One of the CMake variables that will be listed is VTK_DIR. 
Set that variable to the path to VTKConfig.cmake.

Once you have had ccmake generate the necessary makefiles, then run make 
to build the example.

- Amy

Dzung Manh Chu wrote:
> Hello.
>
> I'm using Fedora and just installed VTK 4.4. I'm running the Cone.cxx 
> example with the following CMakeLists.txt file:
>
> PROJECT (Step1)
>
> INCLUDE (${CMAKE_ROOT}/Modules/FindVTK.cmake)
> IF (USE_VTK_FILE)
>   INCLUDE(${USE_VTK_FILE})
> ENDIF (USE_VTK_FILE)
>
> LINK_LIBRARIES(
>         vtkRendering
>         vtkGraphics
>         vtkImaging
>         vtkFiltering
>         vtkCommon
> )
>
> ADD_EXECUTABLE(Cone Cone.cxx)
> TARGET_LINK_LIBRARIES(Cone vtkRendering)
>
> It should have run correctly, but I got this error:
> CMake Error: VTK not found.  Set the VTK_DIR cmake cache entry to the 
> directory containing VTKConfig.cmake.  This is either the root of the 
> build tree, or PREFIX/lib/vtk for an installation.  For VTK 4.0, this 
> is the location of UseVTK.cmake.  This is either the root of the build 
> tree or PREFIX/include/vtk for an installation.
>
> Did any of you also get this problem before? I'v located where 
> VTKConfig.cmake is. But I donot know where "VTK_DIR cmake cache entry" 
> is. Any comment would be highly appreciated.
>
> Dzung.
>
> ------------------------------------------------------------------------
> Fussy? Opinionated? Impossible to please? Perfect. Join Yahoo!'s user 
> panel 
> <http://us.rd.yahoo.com/evt=48516/*http://surveylink.yahoo.com/gmrs/yahoo_panel_invite.asp?a=7%20> 
> and lay it on us.
> ------------------------------------------------------------------------
>
> _______________________________________________
> This is the private VTK discussion list. 
> Please keep messages on-topic. Check the FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>   

-- 
Amy Squillacote
Kitware, Inc.
28 Corporate Drive
Clifton Park, NY 12065
Phone: (518) 371-3971 x106




More information about the vtkusers mailing list