[vtkusers] link error of vtk application

Yixun Liu enjoywm at cs.wm.edu
Thu Feb 19 14:05:43 EST 2009


Amy Squillacote wrote:
> Do you have code in your CMakeLists.txt file to find the vtkIO
> library? It looks like the code to do that is commented out (using
> "#"), unless you're doing it somewhere else in your CMakeLists.txt
> file that you didn't copy here. If the code to find the vtkIO library
> is there, is it set to the correct value when you run CMake?
>
> - Amy
>
> On Tue, Feb 17, 2009 at 3:24 PM, Yixun Liu <enjoywm at cs.wm.edu
> <mailto:enjoywm at cs.wm.edu>> wrote:
>
>     Hi,
>     I developed an application based on VTK. The CMakelist file is
>     like the
>     following,
>
>     #FIND_PACKAGE(VTK REQUIRED)
>     #INCLUDE(${VTK_USE_FILE})
>
>     ...
>
>      TARGET_LINK_LIBRARIES(TetrahedrisationNG
>        Basics
>        Graphics2DNG
>        Graphics3DNG
>        vtkIO
>        vtkCommon
>            )
>
>     The error is
>     /usr/lib64/gcc/x86_64-suse-linux/4.2.1/../../../../x86_64-suse-linux/bin/ld:
>     cannot find -lvtkIO
>
>     Thanks.
>
>     Yixun
>     _______________________________________________
>     Powered by www.kitware.com <http://www.kitware.com>
>
>     Visit other Kitware open-source projects at
>     http://www.kitware.com/opensource/opensource.html
>
>     Please keep messages on-topic and check the VTK FAQ at:
>     http://www.vtk.org/Wiki/VTK_FAQ
>
>     Follow this link to subscribe/unsubscribe:
>     http://www.vtk.org/mailman/listinfo/vtkusers
>
>
I  add
FIND_PACKAGE(VTK REQUIRED)
 INCLUDE(${VTK_USE_FILE})
in my CMakeList and also set the VTK path point to  home/scratch//VTK/Build
I don't know why it doesn't work.

Thanks.



More information about the vtkusers mailing list