rick@cstr.ed.ac.uk (Rick Innis) (09/11/90)
To recap, the problem I had was that when compiling idraw, I got the message
errhandler.o: Undefined symbol set_new_handler() referenced from text segment
Thanks to Olof Damberg (oldam@liu.math.se) and Harald Vogt (harald@cs.ruu.nl)
for the fixes.
First Olof:
The missing function 'set_new_handler' is in _handler.c in
iv/src/libInterViews.
A look at iv/src/libInterViews/Imakefile gives a clue to the solution:
---
#if defined(Use_g_plusplus)
INITOBJS = \
_ctorlist.o \
_dtorlist.o \
_exit.o \
_finish.o \
_handler.o \
_init.o
#endif
---
The macro Use_g_plusplus is not defined anywhere; nor is it mentioned in the
documentation, as far as I can see. I defined this in IVlocal.def and remade
the makefiles.
The other part of the fix came from Harald Vogt:
Line 33 of iv/src/bin/idraw/errhandler.c line 33 has the following declaration;
extern NewHandler* set_new_handler(NewHandler*);
which should read
extern "C" NewHandler* set_new_handler(NewHandler*);
to agree with the declaration of set_new_handler() in
iv/src/libInterView/_handler.c
Finally, there is a bug in libInterViews which causes idraw to crash on
exiting; this is the patch for it:
*** X11-world.c.~1~ Wed Jan 31 20:28:51 1990
--- X11-world.c Wed Aug 1 08:54:09 1990
***************
*** 164,169 ****
--- 164,171 ----
World::~World () {
XCloseDisplay(rep->display());
+ // Bug fix from net, AD, 1-8-90
+ canvas->id = nil; // to prevent ~Canvas from accessing _world
delete rep->_itable;
delete rep;
}
Thanks to both parties, as well as Per Abrahamsen and Ciaran McHale, who also
sent me suggestions as to the cause of the problem.
--Rick.