This is a read-only archive of lispforum.com. The forum was locked to new users and posts and is preserved here as static HTML from a database snapshot taken on 2019-09-07.

newbie question: compilation warning

3 posts · 3445 views

I have the following warning when compiling a project in Allegro CL 9.0:
; 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.

Re: newbie question: compilation warning

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:
(eval-when (:compile-toplevel :load-toplevel :execute)
  (require ...))

Re: newbie question: compilation warning

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.