VTK Compiling with Debian
Matthew Gillen
me at mattgillen.net
Sun Nov 6 10:54:49 EST 2005
Try installing:
libpng12-dev
The 'devel' packages typically include not only the headers, but a
symlink from lib*.so -> lib*.so.# that is needed for compile-time linking.
--Matt
James Kramer wrote:
> Hello to all the great people at BLU. I moved to Boston over a year
> ago and have been keeping a close watch on the goings on at BLU.
> Great Place!!! I'll be more active in the future. I hope someone can
> give some guidance. I need to write some code using C++ ,VTK and
> CMake. I am new to VTK and CMake. I am having trouble compiling vtk.
>
> System: Pentium 4 w Nvidia GeForce4
> OS: Debian 3.1r0
> packages:
> vtk-tcl 4.4.2-6,
> cmake 2.0.5-1
> cpp 3.3.5-1
> ilibpng10-0 1.0.18-1 PNG library, older version - runtime
> libpng12-0 1.2.8rel-1 PNG library )B– runtime
>
> I am trying to work through the tutorials but cannot get pass Step1 Cone.
>
> --I compiled successfully using:
> g++ -I/usr/include/vtk -o Cone
> /usr/share/vtk/Tutorial/Step1/Cxx/Cone.cxx /usr/lib/libvtkGraphics.so
> /usr/lib/libvtkCommon.so -L /usr/X11R6/lib -lGL -lXt -lX11
> /usr/lib/libvtkImaging.so /usr/lib/libvtkRendering.so
>
> ( However, upon running, I get a warning of missing DRI option. It
> was removed from XF86Config-4 in order to run in "nvidia" mode. )
>
> --When I try to compile using cmake:
> cmake -i .
> make
> I receive the following output:
>
> Building object file Cone.o...
> c++ -o Cone.o -Wno-deprecated -I/usr/X11R6/include
> -I/usr/include/vtk -I/usr/include/tcl8.4 -I/usr/include/python2.3
> -c /tmp/Cxx/Cone.cxx
> Building executable /tmp/Cxx/Cone...
> c++ -Wno-deprecated -I/usr/X11R6/include -fPIC Cone.o -o
> /tmp/Cxx/Cone -rdynamic -L/usr/lib/vtk -L/usr/X11R6/lib -lvtkRendering
> -lvtkGraphics -lvtkImaging -lvtkIO -lvtkFiltering -lvtkCommon
> -lpthread -ldl -lm -lvtkDICOMParser -lpng -ljpeg -ltiff -lexpat
> -lvtkftgl -lfreetype -lz -lGLU -lGL -lSM -lICE -lSM -lICE -lX11 -lXext
> -lX11 -lXext -lXt -lSM -lICE -lX11 -lXext
> -Wl,-rpath,/usr/lib/vtk:/usr/X11R6/lib
> /usr/bin/ld: cannot find -lpng
> collect2: ld returned 1 exit status
> make[1]: *** [/tmp/Cxx/Cone] Error 1
> make[1]: Leaving directory `/tmp/Cxx'
> make: *** [default_target] Error 2
>
> I tried the following temporary fixes to get around the error:
>
> 1.edit /usr/lib/vtk/VTKConfig.cmake
> Changed line:
> SET(VTK_PNG_LIBRARIES "/usr/lib/libpng.so;/usr/lib/libz.so")
> to line:
> SET(VTK_PNG_LIBRARIES "/usr/lib/libpng12.so.0;/usr/lib/libz.so")
>
> ACTION:
> cmake -i .
> make
> same -lpng not found error
>
> 2.edit /usr/share/CMake/Modules/FindPNG.cmake
> Changed line:
> FIND_LIBRARY(PNG_LIBRARY png
> ...)
> to line
> FIND_LIBRARY(PNG_LIBRARY png12
> ...)
>
> ACTION:
> cmake -i .
> make
> same -lpng not found error
>
> I thank you in advance for any help provided:
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Discuss mailing list
> Discuss at blu.org
> http://olduvai.blu.org/mailman/listinfo/discuss
More information about the Discuss
mailing list