swarm-support
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: error compiling apps


From: Roger Burkhart
Subject: Re: error compiling apps
Date: Tue, 11 Jun 96 11:12:04 MDT

> while trying to compile Heatbugs I get the following error
> 
> gcc -L../swarm/lib -L/home/ias/tcl/tcl7.4/lib -L/home/ias/tcl/tk4.0/lib
> -L/usr/openwin/lib -L/home/ias/blt/blt2.1/src -L/home/ias/tcl/libtclobjc-1.1b3
> -L/home/ias/xpm/xpm-3.4h/lib -g  -o heatbugs Heatbug.o HeatSpace.o main.o
> HeatbugModelSwarm.o HeatbugObserverSwarm.o HeatbugBatchSwarm.o
> -lspace -lsimtools -ltkobjc -lactivity -lrandom -lswarmobject -ldefobj
> -lcollections  -ltclobjc -lBLT -ltk -ltcl -lXpm -lX11 -lobjc -lm 
> collect2: ld returned 2 exit status
> ld: Undefined symbol 
[...]

The order in which libraries are linked does not match the SWARMLIBS macro
defined in ./swarm/Makefile.conf (-ldefobj should follow -lcollections).  This
could cause unresolved references to appear.

Otherwise, the unresolved referenced you are seeing:

>    _Holding
>    _InvalidLocSymbol 
>    _InvalidIndexLoc 
>    _OutOfMemory 
>    _CreateSubclassing 
>    _Terminated 
>    _AlreadyAtStart
[more omitted...]

are all names of symbol objects defined in the activity, collections, and
defobj libraries.  The names are defined by a process which compiles header
file declarations using a script called make-h2x.  The standard make files
ordinarily take care of this entirely automatically.  You should be able
to find the names defined in the files activity.o, collections.o, and
defobj.o in each library (use the Unix nm command to find defined external
link names).  These files should also be in each of the library archives,
and under SunOS4.1 you have to run ranlib also.  You should check your
make process to make sure that everything is being done that is needed
and that these names are defined where they should be.

Since various people have had various problems resolving references in
various libraries, perhaps we should publish some of the standard nm
command outputs that show which names are defined in each library.  But
in any event, under Unix the use of nm to find defined names and
references, coupled with link order of libraries, is the standard way
to resolve link reference problems.

Hope this helps,
Roger Burkhart


reply via email to

[Prev in Thread] Current Thread [Next in Thread]