[vtkusers] installing VTK on Linux - Help!

Juerg Tschirren juerg-tschirren at uiowa.edu
Sat Sep 22 11:20:24 EDT 2001


use the additional switch -ldl when linking, e.g.:

 $ gcc simple.o -L/usr/lib/vtk -lVTKPatented -lVTKImaging -lVTKGraphics
   -lVTKCommon -lVTKContrib -lpthread -lGL -L/usr/X11R6/lib -lX11 -lXt
   -lXext -ldl -o simple


Juerg


On Sat, 22 Sep 2001, M. Thompson wrote:

> Hi everyone,
>
> I've just about finished installing vtk3.2 on my debian 2.2 Linux system;
> configuring, building etc. all worked fine. I can now even run some of the
> example tcl-scripts in vtk3.2/Graphics/examplesTcl .
>
> However, when I try to make a simple C++ program (see attatchment) using
> some vtk-classes, I get an error.
>
> This is the command I use to compile simple.cxx (no errors):
>
> $ gcc -O2 -w  -I/usr/share/vtk3.2/common -I/usr/share/vtk3.2/contrib
> -I/usr/share/vtk3.2/graphics -I/usr/share/vtk3.2/imaging
> -I/usr/share/vtk3.2/patented  -c simple.cxx -o simple.o
>
> This is the command I use to link (results in error):
>
> $ gcc simple.o -L/usr/lib/vtk -lVTKPatented -lVTKImaging -lVTKGraphics
> -lVTKCommon -lVTKContrib -lpthread -lGL -L/usr/X11R6/lib -lX11 -lXt -lXext
> -o simple
> /usr/lib/vtk/libVTKCommon.so: undefined reference to `dlerror'
> /usr/lib/vtk/libVTKCommon.so: undefined reference to `dlclose'
> /usr/lib/vtk/libVTKCommon.so: undefined reference to `dlopen'
> /usr/lib/vtk/libVTKCommon.so: undefined reference to `dlsym'
> collect2: ld returned 1 exit status
>
>
> I've found out that the functions dlerror, dlclose etc. have something to
> do with an include file dlfcn.h (/usr/include/dlfcn.h) . But I don't know
> how to go further from here.
>
> Does anyone know what's going wrong?
>
> Thanx,
> 	Mark Thompson
>




More information about the vtkusers mailing list