Hi,<br>
Thank you for keeping on help me about building vtk.<br>
I installed mayavi (apt-get install) ,and configure vtk ,make and make install .<br>
This time no errors came out .I am very happy about it .<br>
<br>
However , when I try to complie a program using vtk libararies ,new problem <br>
comes . <br>
Compiling and linking seem good ,no errors at all.<br>
But when I run the generated executable , it tells me "error while
loading shared libraries: libvtkCommon.so.5.0: cannot open shared
object file,no <br>
such file or directory" . I check in /usr/local/lib/
,libvtkCommon.so.5.0 is there and all users have permission to access
it . So I wonder why it produces such<br>
error information and how to overcome .<br>
<br>
My g++ options are followings ( from Makefile,by the way,I appended
-L/usr/local/lib to avoid conficting with vtk libraries in /usr/lib/
,which are installed when mayavi installed . May I remove them ? thay
are vtk version 4<br>
libraries)<br>
<br>
CXX := g++<br>
PROG := myprog<br>
CSRC := $(PROG).cxx<br>
PREFIX := /usr/local<br>
INC := -I$(PREFIX)/include/vtk-5.0<br>
LIB := -lm -lvtkCommon -lvtkIO -lvtkWidgets -lvtkRendering -L/usr/local/lib<br>
<br>
CXXFLAGS := -Wall -O2 -Wno-deprecated<br>
<br>
.PHONY: all clean depend distclean edit install<br>
<br>
all: $(PROG)<br>
<br>
$(PROG): $(CSRC:.cxx=.o)<br>
$(CXX) -o $@ $(CSRC:.cxx=.o) $(LIB)<br>
<br>
%.o: %.cxx<br>
$(CXX) -c $(INC) $(CXXFLAGS) $<<br>