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

Gabriel Dos Reis gdr at cs.tamu.edu
Sat Mar 10 10:15:42 UTC 2007


On Sat, 10 Mar 2007, Juan Jose Garcia-Ripoll wrote:

| 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.

Aha!

| 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.

OK, thanks for the explanation.  Faré sent me similar explanation.

Thanks!

-- Gaby




More information about the ecl-devel mailing list