[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

troubles with .zo and macro



I've made an application that works, then I wanted to compile it
into byte code and I have got some troubles.
 
This is the main file:
; load commands
(load/use-compiled (build-path "param.scm"))
(load/use-compiled (build-path "matrix4.scm"))
(load/use-compiled (build-path "coord-3d.scm"))
(load/use-compiled (build-path "object.scm"))
(load/use-compiled (build-path "camera.scm"))
(load/use-compiled (build-path "light.scm"))
(load/use-compiled (build-path "dialog.scm"))
(load/use-compiled (build-path "graphics.scm"))
(load/use-compiled (build-path "quicksort.scm"))
(load/use-compiled (build-path "main.scm"))
 
It works perfectly with not-compiled files, but using .zo I've
this error when loading "matrix4.zo":
-->"reference to undefined identifier: set-matrix4"

set-matix4 is a macro defined like this:
 
(define-syntax set-matrix4
  (syntax-rules([ ])
               ((set-matrix4 mat[i][j] val) (vector-set! (vector-ref mat j) i val))))
 
Help will be useful...
 

-------The batch file I use to compile
C:\Progra~1\PLT\Mzc.exe -z param.scm
C:\Progra~1\PLT\Mzc.exe -z matrix4.scm
C:\Progra~1\PLT\Mzc.exe -z coord-3d.scm
C:\Progra~1\PLT\Mzc.exe -z object.scm
C:\Progra~1\PLT\Mzc.exe -z camera.scm
C:\Progra~1\PLT\Mzc.exe -z light.scm
C:\Progra~1\PLT\Mzc.exe -z dialog.scm
C:\Progra~1\PLT\Mzc.exe -z graphics.scm
C:\Progra~1\PLT\Mzc.exe -z quicksort.scm
C:\Progra~1\PLT\Mzc.exe -z main.scm
copy *.zo .\compiled
del *.zo