Subject: Re: [SWIPL] Realy trouble ?

From: Jan Wielemaker <[email-masked]>
Date: Mon, 14 May 2001 10:18:57 +0200

On Sat, 12 May 2001, îÉËÏÌÁÊ æÅÄÏÒÏ× wrote:
>
>Hi, excuse me for stupid question, I never used gcc before.
>compiling xpce(libraries)    for QNX RTP v6 on PC.
>pl was generated successfully and works(in principle).
>
># make so
>g++ -c -I../include -Wall -O2 -I. -I../src -I/usr/X11R6/include -fPIC -funsigned-char
>      -DHAVE_CONFIG_H ../src/itf/main.cxx -o main.o
>
>In file included from ../src/itf/main.cxx:14:
>../include/pce/Chain.h: In method `PceChain::PceChain(const PceChain &)':
>../include/pce/Chain.h:112: call of overloaded `PceObject(const PceChain &)' is ambiguous
>../include/pce/Pce.h:362: candidates are: PceObject::PceObject(const PceObject &)
>../include/pce/Pce.h:364:                       PceObject::PceObject(PceArg)
>../include/pce/Pce.h:368:                       PceObject::PceObject(const char *) <near match>
>../include/pce/Pce.h:373:                       PceObject::PceObject(void *) <near match>
>mk: *** [libXPCEmain.a] Error 1
>#
>
>info:
># g++ -v
>Reading specs from /usr/lib/gcc-lib/ntox86/2.95.2/specs
>gcc version 2.95.2 19991024 (release)
>#
>
>Is it realy fatal error?

The compiler stops, so you have no executable.  Whether this is
fatal? :-)

It strikes me as a bit odd; as far as I know recent GCC versions have
no trouble with the XPCE C++ code.  Anyhow, this code isn't
even working anymore, so you can fix your installation using

	% make clean

Edit config.h, removing the *two* (little mistake) lines
#define O_CPLUSPLUS 1.  Then edit the generated Makefile and remove
cpp.o from the macro ITF2OBJS defined around line 412.

Now simply re-make using

	% make

and it all is well

	% make install

	Cheers --- Jan

P.s.	I've updated the configure script to skip the C++ interface from
	the default configuration.  The new configure is in the CVS
	archive (pl/packages/xpce/src/configure).