From: Tobias C. R. <tc...@fr...> - 2009-11-26 21:22:42
|
David Creelman <cre...@gm...> writes: > On Wed, Nov 25, 2009 at 08:19:38AM +0100, Tobias C. Rittweiler wrote: >> David Creelman <cre...@gm...> writes: >> >> > On Tue, Nov 24, 2009 at 04:13:35PM -0800, Bhaskara Marthi wrote: >> >> On Tue, Nov 24, 2009 at 3:50 PM, David Creelman <cre...@gm...>wrote: >> >> >> >> > Hi, >> >> > I have a small utility I've written, cl-reminders that runs nicely in SBCL. >> >> > >> > <snip> >> > >> >> > >> >> The specific error seems to be caused by sbcl not knowing that >> >> with-smtp-connection is a macro, therefore treating (socket server) as a >> >> function call. The likely causes are either 1) the macro definition of >> >> with-smtp-connection has not been loaded 2) the symbol with-smtp-connection >> >> is in a different package, and is not present in the package where your >> >> unetwork-sendmail is defined. >> > >> > unetwork exports with-smtp-connection in its package.lisp. >> > The package that uses unetwork has a :uses :unetwork clause in it. >> > I thought this would mean that :unetwork exported symbols could be used >> > within the package I've created. >> >> Do you have an (IN-PACKAGE :YOUR-PKG) form at the beginning of your >> files? > > I have (in-package :reminders) at the end of my package file and reminders > has a :use :unetwork in it's package definition. The order of file loading > I'm gathering is controlled by the .asd file, I have the package getting > loaded first up. > > I'm not sure if this is the accepted way of doing things. I think I copied > this way of doing things from another lib I found. Can't remember which one. That's not going to work. The *PACKAGE* variable is rebound by LOAD and COMPILE-FILE, and the IN-PACKAGE form in your package.lisp won't affect further loading/compiling. You have to (fsvo "have to", at least) put the appropriate IN-PACKAGE form to the beginning of each file. That will also cope much better with your development environment. -T. |