On 5/23/07, Eduardo Cavazos wayo.cavazos@gmail.com wrote:
Do I stick (include "~~/syntax-case") in "c-struct.scm"?
IIRC, you have to put (load "~~/syntax-case.scm") in your Gambit initialization file. Search the Gambit manual for "gambcini".
"c-struct.scm" depends on "srfi-28.scm". So do I (include "srfi-28.scm") as well?
Finally, should I put (include "c-struct") in "Xlib.scm"?
I don't know about this at all.
TJ
Afficher les réponses par date
Dunno if it helps, but the way I usually do this is to start the compiler interactively (preloaded with syntax-case) and use the 'compile-file' function.
E.g. gsc -i ~~/syntax-case -
(compile-file "~/tmp/c-struct.scm")
#t
Cheers,
Phil
TJ wrote:
On 5/23/07, Eduardo Cavazos wayo.cavazos@gmail.com wrote:
Do I stick (include "~~/syntax-case") in "c-struct.scm"?
IIRC, you have to put (load "~~/syntax-case.scm") in your Gambit initialization file. Search the Gambit manual for "gambcini".
"c-struct.scm" depends on "srfi-28.scm". So do I (include "srfi-28.scm") as well?
Finally, should I put (include "c-struct") in "Xlib.scm"?
I don't know about this at all.
TJ _______________________________________________ Gambit-list mailing list Gambit-list@iro.umontreal.ca https://webmail.iro.umontreal.ca/mailman/listinfo/gambit-list
On Wed, May 23, 2007 at 10:29:11PM +0800, TJ wrote :
On 5/23/07, Eduardo Cavazos wayo.cavazos@gmail.com wrote:
Do I stick (include "~~/syntax-case") in "c-struct.scm"?
IIRC, you have to put (load "~~/syntax-case.scm") in your Gambit initialization file. Search the Gambit manual for "gambcini".
What I usually do is have c-struct.scm like ----snip---- (include "~~/syntax-case.scm") ;; includes the syntax-rules (include "c-struct-defs.scm") ;; includes your syntaxes and so on ----snip---- If you put syntax-case un c-struct, you won't be able to compile it as the syntaxes won't be transformed in c-struct (because of the order in which files are parsed/compiled, as far as I remember).
Or search the gambcini, but I've never done it this way.
Finally, should I put (include "c-struct") in "Xlib.scm"?
I don't know about this at all.
Maybe it could be put at a better place, such as in the FFI handling files ? This macro can be quite useful indeed to access structures...
Adrien