[Openmcl-devel] Undefined function: muting the compiler
Michael Minerva
minerva at agentsheets.com
Tue Sep 28 16:36:03 PDT 2010
Hey Paul,
I think our issue might be better described with an example with three files:
First, we have an init.lisp that contains:
(load "home:A")
(load "home:B")
Then, A.lisp:
(defun a-func()
(b-func))
Finally, b.lisp:
(defun b-func ()
(print "B-FUNC!"))
When you execute the init file you will get this warning:
;Compiler warnings for "home:A.lisp.newest" :
; In A-FUNC: Undefined function B-FUNC
Most of the time we would try to declare b-func in a file that is loaded before a.lisp gets loaded, but in a few cases this is impossible. Is there anyway to avoid this type of warning? Thanks.
--Mike
On Sep 28, 2010, at 4:48 PM, Paul Krueger wrote:
> Alex,
>
> I wonder if there isn't something else going on for you. I was pretty sure that I didn't see the behavior you describe, so I created a simple example file containing two defun's that each reference the other to test my memory. Neither load nor compile-file gave any kind of warning for this example. You DO get a warning if you just open the file in the IDE and do an "execute all" on it, but I sort of expect that.
>
> Paul
>
>
> On Sep 28, 2010, at 5:20 PM, Alexander Repenning wrote:
>
>> This is just a silly but general CL question but I wonder how people are handling it. If you are loading a file containing, say, function a and b and a calling b and for some reason you cannot move up b to be located before a you will get the compiler warning In A: Undefined function B
>>
>> Not a big deal but it is really nice to get rid of all compiler warnings if possible. I just cant find relevant stuff in CLTL2. I would imagined that one could do something like
>>
>> (proclaim '(type function b)) or (proclaim '(function b))
>>
>> but that does not appear to work
>>
>> any suggestions?
>>
>> Alex
>>
>>
>>
>> _______________________________________________
>> Openmcl-devel mailing list
>> Openmcl-devel at clozure.com
>> http://clozure.com/mailman/listinfo/openmcl-devel
>
> _______________________________________________
> Openmcl-devel mailing list
> Openmcl-devel at clozure.com
> http://clozure.com/mailman/listinfo/openmcl-devel
>
More information about the Openmcl-devel
mailing list