[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.lisp

compiling files with structure constants

Mirko

5/7/2015 7:37:00 PM

This is on CCL (on Windows 7)

I have a constant that evaluates to a structure

(defstruct xyz x y z)
(defconstant +i+ (make-xyz :x 1 :y 0 :z 0))

In subsequent code I have functions that use +i+. For example:

(defun foo ()
+i+)


Evaluation works (in clime C-x C-e) by putting the cursor after the closing parenthesis

But file compile-file (or in slime compile-defun (C-c C-c)) results in following error:

No MAKE-LOAD-FORM method is defined for #S(XYZ :X 1 :Y 0 :Z 0)
[Condition of type SIMPLE-ERROR]

Restarts:
0: [RETRY-COMPILE-FILE] Retry compiling #P"C:/Users/977315/AppData/Local/Temp/cclBEB6.tmp"
1: [SKIP-COMPILE-FILE] Skip compiling and loading #P"C:/Users/977315/AppData/Local/Temp/cclBEB6.tmp"
2: [ABORT] Abort compilation.
3: [*ABORT] Return to SLIME's top level.
4: [ABORT-BREAK] Reset this thread
5: [ABORT] Kill this thread

Backtrace:
0: (CCL::NO-MAKE-LOAD-FORM-FOR #S(XYZ :X 1 :Y 0 :Z ...))
1: (CCL::FASL-SCAN-USER-FORM #S(XYZ :X 1 :Y 0 :Z ...))


How can I go around that?

Thanks (in advance),

Mirko
2 Answers

Kaz Kylheku

5/7/2015 8:26:00 PM

0

On 2015-05-07, Mirko Vukovic <mirko.vukovic@gmail.com> wrote:
> This is on CCL (on Windows 7)
>
> I have a constant that evaluates to a structure
>
> (defstruct xyz x y z)
> (defconstant +i+ (make-xyz :x 1 :y 0 :z 0))
>
> In subsequent code I have functions that use +i+. For example:
>
> (defun foo ()
> +i+)

This is becoming somewhat of a FAQ.

http://stackoverflow.com/questions/346695/no-make-load-form-error-with-openmcl-c...

Mirko

5/8/2015 4:47:00 PM

0

On Thursday, May 7, 2015 at 4:25:54 PM UTC-4, Kaz Kylheku wrote:
> On 2015-05-07, Mirko Vukovic <mirko.vukovic@gmail.com> wrote:
> > This is on CCL (on Windows 7)
> >
> > I have a constant that evaluates to a structure
> >
> > (defstruct xyz x y z)
> > (defconstant +i+ (make-xyz :x 1 :y 0 :z 0))
> >
> > In subsequent code I have functions that use +i+. For example:
> >
> > (defun foo ()
> > +i+)
>
> This is becoming somewhat of a FAQ.
>
> http://stackoverflow.com/questions/346695/no-make-load-form-error-with-openmcl-c...

uuuh, more stuff to learn - thank you for the link