[Ecls-list] c:build-program and -eval

Juan Jose Garcia-Ripoll jjgarcia at users.sourceforge.net
Sat Mar 10 10:12:33 UTC 2007

10 Mar 2007 03:45:33 -0600, Gabriel Dos Reis <gdr at cs.tamu.edu>:
> Requiring "cmp" indeed does the trick.  However, I suspect there might
> be a bug:  The form:
> % ecl -eval '(progn (require (quote cmp)) (c:build-program "hello" :lisp-files (quote ("hello.o"))) (quit))'
> produces the same error as before.

No, that is not an error. Look at the symbol "c:build-program". You
are asking for an exported symbol, but at the moment the reader sees
your form the C package is empty because the form (require 'cmp) has
not yet taken effect. Hence, the reader finds no external symbol.

If you rather use c::build-program the reader will create an internal
symbol which will get replaced when the compiler is loaded.

If you split the statement into two -eval forms, then first the
compiler is loaded and then the second string is parsed into a lisp
form and evaluated.


Dpto. de Fisica Teorica I, Fac. de CC Fisicas, Universidad Complutense,
Ciudad Universitaria s/n Madrid 28040 (Spain)

More information about the ecl-devel mailing list