From: OMouse
Subject: Compiling + Packages
Date: 
Message-ID: <1136674432.363750.38820@g47g2000cwa.googlegroups.com>
I'm trying to compile a file (a.lisp) that includes (http.fas) but I'm
getting this error message, "there is no package with name "HTTP".

a.lisp
---------------------------------------------
(load "http.fas")
(use-package 'http)

(defun param(str)
  (http::http-query-parameter str))
---------------------------------------------

When I do this in clisp line by line, it's fine. But when I compile, it
dies.
Thanks for any help,
Rudolf
From: tichy
Subject: Re: Compiling + Packages
Date: 
Message-ID: <dptfpq$d6k$1@nemesis.news.tpi.pl>
OMouse wrote:
> I'm trying to compile a file (a.lisp) that includes (http.fas) but I'm
> getting this error message, "there is no package with name "HTTP".
> 
> a.lisp
> ---------------------------------------------
> (load "http.fas")
> (use-package 'http)
> 
> (defun param(str)
>   (http::http-query-parameter str))
> ---------------------------------------------
> 
> When I do this in clisp line by line, it's fine. But when I compile, it
> dies.
> Thanks for any help,
> Rudolf
> 

Hi.

Try EVAL-WHEN:

foo.lisp
---------------------------------------------
(defpackage "FOO"
   (:export "FOO-VALUE")
   (:use "COMMON-LISP"))

(in-package "FOO")

(defvar foo-value 'blah)
---------------------------------------------

a.lisp
---------------------------------------------
(eval-when (:compile-toplevel :load-toplevel :execute)
   (load "/home/j/foo.fasl"))

(defun test ()
   foo:foo-value)
---------------------------------------------

CL-USER> (compile-file #P"/home/j/foo.lisp")

CL-USER> (compile-file #P"/home/j/a.lisp")

CL-USER> (load #P"/home/j/a.fasl")

CL-USER> (test)

===> FOO::BLAH

Regards, Szymon.