Hi,
I'm using GNU's clisp implementation, and have now had
to split my code up into several files, which contain circular
function dependancies. (ie files foo.lsp and baz.lsp
both contain code which calls functions defined in the other file)
Now the compiler gives a list of functions used but not defined
when compiling a particular file. My problem is how to tell the
compiler that particular references are ok.
I tried a (declare (function other-func)) within the calling scope,
but that doesn't work.
Is there any way out of this, other than just having one big source
file?
nathan
--
Nathan Sidwell The windy road is more interesting
Chameleon Architecture Group at SGS-Thomson, formerly Inmos
http://www.pact.srf.ac.uk/~nathan/ Tel 0117 9707182
······@pact.srf.ac.uk or ······@inmos.co.uk or ······@bristol.st.com
In article <·············@pact.srf.ac.uk>
Nathan Sidwell <······@pact.srf.ac.uk> writes:
Hi,
I'm using GNU's clisp implementation, and have now had
to split my code up into several files, which contain circular
function dependancies. (ie files foo.lsp and baz.lsp
both contain code which calls functions defined in the other file)
Now the compiler gives a list of functions used but not defined
when compiling a particular file. My problem is how to tell the
compiler that particular references are ok.
I tried a (declare (function other-func)) within the calling scope,
but that doesn't work.
Is there any way out of this, other than just having one big source
file?
Read about WITH-COMPILATION-UNIT.
--Vassili
From: Howard R. Stearns
Subject: Re: compiler warnings about undefined functions
Date:
Message-ID: <32551229.ABD322C@elwoodcorp.com>
WITH-COMPILATION-UNIT is supposed to be the portable way to do this --
provided that the implementation takes advantage of it. I do not know
whether GCL does this.
Nathan Sidwell wrote:
>
> Hi,
> I'm using GNU's clisp implementation, and have now had
> to split my code up into several files, which contain circular
> function dependancies. (ie files foo.lsp and baz.lsp
> both contain code which calls functions defined in the other file)
> Now the compiler gives a list of functions used but not defined
> when compiling a particular file. My problem is how to tell the
> compiler that particular references are ok.
>
> I tried a (declare (function other-func)) within the calling scope,
> but that doesn't work.
>
> Is there any way out of this, other than just having one big source
> file?
>
> nathan
>
> --
> Nathan Sidwell The windy road is more interesting
> Chameleon Architecture Group at SGS-Thomson, formerly Inmos
> http://www.pact.srf.ac.uk/~nathan/ Tel 0117 9707182
> ······@pact.srf.ac.uk or ······@inmos.co.uk or ······@bristol.st.com