users-prolog
[Top][All Lists]
Advanced

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

Re: Compiling C++ files with gplc


From: Fergus Henderson
Subject: Re: Compiling C++ files with gplc
Date: Tue, 20 Feb 2001 01:29:04 +1100

I'm not sure if what you're trying to do is possible,
but here's some educated guesses that might help...

On 19-Feb-2001, Jay Bradley <address@hidden> wrote:
> gplc -v --c-compiler g++ threeBody.c threeBrain.pl

Try adding `-lstdc++' or `-lg++' (depending on which version of g++
you're using).  Or more generally, compile a C++ program using the
`-v' option to g++ and see what libraries it links in.

> /tmp/gplcSscwZZ.o(.text+0xb5): undefined reference to `Start_Prolog(int, char 
> **)'
> /tmp/gplcSscwZZ.o(.text+0xc5): undefined reference to `Find_Atom(char *)'
> /tmp/gplcSscwZZ.o(.text+0xe2): undefined reference to `Pl_Query_Start(int, 
> int, long *, int)'
> /tmp/gplcSscwZZ.o(.text+0xf6): undefined reference to `Pl_Query_End(int)'
> /tmp/gplcSscwZZ.o(.text+0xfe): undefined reference to `Reset_Prolog(void)'
> /tmp/gplcSscwZZ.o(.text+0x10d): undefined reference to `Stop_Prolog(void)'

You probably need to wrap the declarations of those functions
inside `extern "C" { ... }'.

-- 
Fergus Henderson <address@hidden>  |  "I have always known that the pursuit
                                    |  of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh>  |     -- the last words of T. S. Garp.



reply via email to

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