The macro WITH-COMPILATION-UNIT is intended to resolve this problem. You
would do:
(with-compilation-unit ()
(compile-file "str.lsp")
(load "str")
(compile-file "plot.lsp"))
--
Barry Margolin, bar...@bbnplanet.com
GTE Internetworking, Powered by BBN, Cambridge, MA
Support the anti-spam movement; see <http://www.cauce.org/>
Please don't send technical questions directly to me, post them to newsgroups.
well, Jari Aalto's questions are all ignorant of the Lisp philosophy
(after 5 years he has learned less than my cat did the first month she
spent in my lap while I was programming), so my answer doesn't really
have anything to with the _general_ topic at hand, only his _specific_
"problems". don't make the mistake of thinking that all the stuff he's
doing is not worth doing or finding out -- it is that somebody who is so
profoundly uninterested in doing it right does it that is the problem.
to your question: generally speaking, you need to load Lisp definitions
in the order they are needed. macros first, then typically types and
classes. variables that are declared special must be known to the
compiler before functions that bind or reference them are compiled.
complex defgeneric forms need to go before the first method. etc. it
might be wise to arrange files to be compiled and loaded in these terms
since Lisp doesn't really provide "forward declarations", but there's
nothing to say a different order is a violation of anything or that you
won't succeed with a different order, it just makes sense to make a small
set of rules for yourself that keeps your mind of these problems.
#:Erik
--
God grant me serenity to accept the code I cannot change,
courage to change the code I can, and wisdom to know the difference.