[vtkusers] Cannot find -lXext

Daniel Bengtsson cyg.nus at usa.net
Thu Feb 1 16:34:33 EST 2001


Hi!

I have troubles when compiling vtk-programs with c++. I constantly gets the
following error:

...ld: cannot find -lXext

I use a file called Cone.c++ and use the following Makefile:
----------------------------------------------------------------------------
-----
VTKINCDIR	= -I/local/share/vtk/include
VTKLIBDIR	= /local/share/vtk/$(HOSTTYPE)/lib
MESALIBDIR	= /local/share/mesa/$(HOSTTYPE)/lib
LIBS		= -lVTKImaging -lVTKGraphics -lVTKCommon -lGL -lXext -lXt -lX11 -lm
LDFLAGS     = -L/usr/X11R6/lib -L$(MESALIBDIR) -L$(VTKLIBDIR)
CXXFLAGS	= $(VTKINCDIR) -DVTK_USE_IMAGING
CXX		= g++
TARGET		= sphere
SRCS		= $(TARGET).C
OBJS		= $(TARGET).o


.SUFFIXES: .C
.C.o:
	$(CXX) $(CXXFLAGS) -c $<

all: $(TARGET)

$(TARGET): $(TARGET).o
	$(CXX) $(OBJS) $(LDFLAGS) $(LIBS) -o $(TARGET)

clean:
	rm -f *.o *~ core

spotless:
	rm -f *.o *~ core $(TARGET)
----------------------------------------------------------------------------
------

And the file libXext.a is located in /usr/X11R6/lib as specified in the
Makefile.

I have the following environment variable set LD_LIBRARY_PATH=/usr/lib


Why cant the linker find libXext ?? What can I more add to make it find it ?

/Daniel





More information about the vtkusers mailing list