Newsgroups: comp.windows.interviews
Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!think.com!snorkelwacker.mit.edu!stanford.edu!cnm.us.es!juando
From: juando@cnm.us.es
Subject: Re: help
Message-ID: <"<9105141856.AA26881@cnmus.cnm.us.es>
Sender: news@shelby.stanford.edu (USENET News System)
Organization: Internet-USENET Gateway at Stanford University
References: <"Mail.from.'sri@milton.u.washington.edu'.dated.14.May.91.16: 51*"@MHS>
Date: Tue, 14 May 1991 19:56:11 GMT
Lines: 58

>I am trying to create an application specific editor, using Unidraw
>library. I am getting the following error while linking. Can someone
>let me know, what additional libraries I should include?
>(I am using AT&T c++ 2.0 compiler)
>
>Thanks.
>----------
>	CC -o soil soil.o soileditor.o soilcreator.o \
>	/u1129/sri/InterViews/lib/libUnidraw.a \
>	/u1129/sri/InterViews/lib/libIV-X11.a \
>	/u1129/sri/InterViews/lib/libDispatch.a \
>	/u1129/sri/InterViews/lib/libIV-look.a \
>	/u1129/sri/InterViews/lib/libOS.a \
>	/u1129/sri/InterViews/lib/libgraphic.a \
>	/u1129/sri/InterViews/lib/libInterViews.a /usr/lib/libX11.a -lm
>undefined               first referenced
> symbol                     in file
>_XShapeQueryExtensio            /u1129/sri/InterViews/lib/libIV-X11.a
>___ct__11dpIOHandler            /u1129/sri/InterViews/lib/libInterViews.a
>_instance__12dpDispa            /u1129/sri/InterViews/lib/libInterViews.a
>___dt__11dpIOHandler            /u1129/sri/InterViews/lib/libInterViews.a
>ld fatal: Symbol referencing errors. No output written to soil

Using nm(1) I've seen that:

_XShapeQueryExtensio ... Is defined in /usr/lib/libXext.a which you did not
include.

	The rest of the symbols seem to be defined in libDispatch. The
problem might be related to the order in which they are included. When
ld looks into libDispatch it may find nothing interesting, the symbols
might be required by a library which is included later, but it will not
go back to libDispatch.  Libraries should be included from highest to
lowest level. The order I would suggest is:

	libUnidraw.a
	libIV-look.a
	libgraphic.a
	libInterViews.a
	libIV-X11.a
	libDispatch.a
	libOS.a
	libXext.a
	libX11.a
	-lm

	In fact I think the symbols which seem not to be defined are
required by libInterViews which you included after libDispatch, so
placing libDispatch after libInterViews will probably be enough.

	By the way, are you using Imakefiles?. If you are not maybe you
can try and see if that makes things easier, but if you are there is
something to check somewhere either in the Imakefile or in InterViews
distribution.

Juan.

juando@cnm.us.es
