[Ecls-list] C compiler errors during compile-file

Dustin Long dlong at stevens.edu
Wed May 9 04:30:28 UTC 2007


Whoops. Made a mistake trying to find a minimal example. Change the last 
line to:
(format t "~s" the-list))))

So it is:

(defvar *ls* nil)

(let ((*ls* '(1 2 3 4 5 6 7)))
  (let ((the-list (cons nil *ls*)))
    (let ((prev the-list))
      (flet ((cut () (let (kill)
               (setf kill (cdr prev)
                     (cdr prev) (cdr kill)
                     prev (cons nil prev))))))
      (format t "~s" the-list))))

The last line probably doesn't matter, though. I suspect it's something 
to do with the flet.

Dean O'Connor wrote:
>
> don't know about the compile, but if I just drop that code in the 
> Emacs/ECL REPL I get this error:
>
> (NIL 1 2 3 4 5 6 7) fell through ETYPECASE expression.
> Wanted one of (SIMPLE-STRING STRING).
>   [Condition of type SI::CASE-FAILURE]
>
> Perhaps that is the cause.
>
> cheers
> deano
>
> Dustin Long wrote:
>> Just one more, then I'm done.
>>
>> When I try to compile-file the following:
>>
>> (defvar *ls* nil)
>>
>> (let ((*ls* '(1 2 3 4 5 6 7)))
>>   (let ((the-list (cons nil *ls*)))
>>     (let ((prev the-list))
>>       (flet ((cut () (let (kill)
>>                (setf kill (cdr prev)
>>                      (cdr prev) (cdr kill)
>>                      prev (cons nil prev))))))
>>       (format t the-list))))
>>
>> I get the following compiler errors on the .c
>>
>> ;;; cl  -MD -EHsc -DGC_DLL -nologo -DECL_THREADS  -O2 
>> -I"d:/home/dev/lang/ecl/" -w -c "D:/home/dev/code/x.c" 
>> -Fo"D:/home/dev/code/x.obj"
>>
>> x.c
>> D:/home/dev/code/x.c(35) : error C2065: 'lex0' : undeclared identifier
>> D:/home/dev/code/x.c(35) : error C2109: subscript requires array or 
>> pointer type
>> D:/home/dev/code/x.c(35) : error C2106: '=' : left operand must be 
>> l-value
>>
>> Similar errors appear on linux.
>>
>>
>> Dustin
>>
>> ------------------------------------------------------------------------- 
>>
>> This SF.net email is sponsored by DB2 Express
>> Download DB2 Express C - the FREE version of DB2 express and take
>> control of your XML. No limits. Just data. Click to get it now.
>> http://sourceforge.net/powerbar/db2/
>> _______________________________________________
>> Ecls-list mailing list
>> Ecls-list at lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/ecls-list
>>   
>





More information about the ecl-devel mailing list