[Ecls-list] compiling ls.lsp and commandline args
Petr Šimon
sim at klubko.net
Mon May 14 05:38:03 UTC 2007
On Sunday 13 May 2007 19:25:27 Petr Šimon wrote:
> Hello,
> I am starting with ecl and have two questions:
> 1. I was trying to use ext:command-args, but how do I pass more arguments
> to ecl? Running:
> ecl -shell test.lisp somefile
> fails with "Unknown command line option test.lisp"
>
> 2. I tried to compile ls.lsd from examples, but it failed with
>
> > (c:build-program "test" :lisp-files '("test.o"))
>
> ;;; Warning: File #P"test" is of no known file type. Assuming it is an
> object file.
> ;;; Note: Invoking external command:
> ;;;
> gcc -D_GNU_SOURCE -g -O2 -fPIC -fstrict-aliasing -Dlinux -O
> "-I/usr/local/lib/ecl/" -w -c "/home/sim/lisp/sandbox/ECLINITTdAMHS.c" -o
> "/home/sim/lisp/sandbox/ECLINITTdAMHS.o"
>
> ;;; Note: Invoking external command:
> ;;;
> gcc -o "/home/sim/lisp/sandbox/test" -L"/usr/local/lib/ecl/"
> "/home/sim/lisp/sandbox/ECLINITTdAMHS.o" "/home/sim/lisp/sandbox/test.o"
> -Wl,--rpath,/usr/lib/ecl/ -lecl -ldl -lm -lgmp
>
> /home/sim/lisp/sandbox/test.o: In function `init_TEST':
> /home/sim/lisp/sandbox/test.c:35: multiple definition of `init_TEST'
> /home/sim/lisp/sandbox/ECLINITTdAMHS.o:/home/sim/lisp/sandbox/ECLINITTdAMHS
>.c:22: first defined here
> /usr/bin/ld: Warning: size of symbol `init_TEST' changed from 109
> in /home/sim/lisp/sandbox/ECLINITTdAMHS.o to 284
> in /home/sim/lisp/sandbox/test.o
> collect2: ld returned 1 exit status
> (SYSTEM "gcc -o \"/home/sim/lisp/sandbox/test\" -L\"/usr/local/lib/ecl/\"
> \"/home/sim/lisp/sandbox/ECLINITTdAMHS.o\"
> \"/home/sim/lisp/sandbox/test.o\" -Wl,--rpath,/usr/lib/ecl/ -lecl -ldl
> -lm -lgmp") returned non-zero value 1
> Broken at EVAL.Available restarts:
> 1. (CONTINUE) Continues anyway.
> Broken at C::LINKER-CC.
>
>
> What am I doing wrong?
>
> Thanks a lot
> Petr
>
> -------------------------------------------------------------------------
> 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
I found the answer for my compilation problem, but I still don't quite
understand how to process commandline arguments without compilation. There is
an answer in the archives that si::argv should be used. Is there an example
how to make it work from commandline? I thought that ext:command-args can be
used the same way as sb-ext:*posix-argv*.
Thanks a lot
Petr
More information about the ecl-devel
mailing list