Discussion of Common Lisp
-
hajovonta
- Posts: 17
- Joined: Wed Aug 24, 2011 12:42 am
Post
by hajovonta » Thu Apr 11, 2013 7:40 am
I have the following warning when compiling a project in Allegro CL 9.0:
Code: Select all
; While FILE-COMPILING #'(:TOP-LEVEL-FORM "main.cl" 0) in #P"C:\\allegro-projects\\web\\main.cl"
; starting at file character position 0:
Warning: compile-file found "REQUIRE" at the top-level -- see the documentation for comp:*cltl1-compile-file-toplevel-compatibility-p*
I did a search on the web, and found some explanations, but I don't exactly know what are my possibilities to get rid of it.
-
Kompottkin
- Posts: 94
- Joined: Mon Jul 21, 2008 7:26 am
- Location: München, Germany
-
Contact:
Post
by Kompottkin » Fri Apr 12, 2013 12:13 am
Do you really need to use
require? It's deprecated. If you want to make use of libraries, use
Quicklisp.
Anyway, the
documentation page referenced by the error message tells you what you need to do to fix the issue: Wrap the
require form in an
eval-when. Like this:
Code: Select all
(eval-when (:compile-toplevel :load-toplevel :execute)
(require ...))
-
hajovonta
- Posts: 17
- Joined: Wed Aug 24, 2011 12:42 am
Post
by hajovonta » Fri Apr 12, 2013 1:04 am
Thanks, Kompottkin. I like Quicklisp, however, when you load it into AllegroCL Express, it almost fills the entire heap granted in this edition. And I have a very small and simple project, so a simple require is enough. The code you provided works.