$ ./scm -rcompile -e '(compile->executable "ex1.scm")'
; Scheme (linux) script created by SLIB/batch Fri Oct 21 11:08:01 2016
; [-p linux]
; ================ Write file with C defines
(delete-file "scmflags.h")
(call-with-output-file
"scmflags.h"
(lambda (fp)
(for-each
(lambda (string) (write-line string fp))
'("#define IMPLINIT \"Init5f2.scm\""
"#define CCLO"
"#define FLOATS"))))
; ================ Compile C source files
(system "gcc -c continue.c scm.c scmmain.c findexec.c script.c time.c repl.c scl.c eval.c sys.c subr.c debug.c unif.c rope.c")
scm.c: In function ‘process_signals’:
scm.c:176:17: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
wta(UNDEFINED, (char *)i, "");
^
scm.c: In function ‘scmable_signal’:
scm.c:290:22: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
wta(UNDEFINED, (char *)i, "");
^
scmmain.c: In function ‘main’:
scmmain.c:109:32: warning: assignment discards ‘const’ qualifier from pointer target type [enabled by default]
if (0==argc) {argc = 1; argv = generic_name;} /* for macintosh */
^
scmmain.c:119:16: warning: assignment discards ‘const’ qualifier from pointer target type [enabled by default]
script_arg = argv[2]; /* Save for scm_find_execpath() call */
^
scmmain.c:120:5: warning: passing argument 1 of ‘script_count_argv’ from incompatible pointer type [enabled by default]
nargc = script_count_argv(nargv);
^
In file included from scmmain.c:30:0:
scm.h:1080:17: note: expected ‘const char **’ but argument is of type ‘char **’
SCM_EXPORT int script_count_argv P((const char **argv));
^
scmmain.c:122:15: warning: assignment from incompatible pointer type [enabled by default]
else {nargv = argv; nargc = argc;}
^
scmmain.c:124:3: warning: passing argument 2 of ‘scm_find_execpath’ from incompatible pointer type [enabled by default]
execpath = scm_find_execpath(nargc, nargv, script_arg);
^
In file included from scmmain.c:30:0:
scm.h:775:18: note: expected ‘const char * const*’ but argument is of type ‘char **’
SCM_EXPORT char *scm_find_execpath P((int argc, const char * const *argv, const char *script_arg));
^
scmmain.c:131:5: warning: passing argument 2 of ‘scm_init_from_argv’ from incompatible pointer type [enabled by default]
scm_init_from_argv(nargc, nargv, script_arg, iverbose, buf0stdin);
^
In file included from scmmain.c:30:0:
scm.h:768:17: note: expected ‘const char * const*’ but argument is of type ‘char **’
SCM_EXPORT void scm_init_from_argv P((int argc, const char * const *argv, char *script_arg,
^
script.c: In function ‘find_impl_file’:
script.c:149:18: warning: initialization discards ‘const’ qualifier from pointer target type [enabled by default]
char *extptr = exec_path + strlen(exec_path);
^
script.c:165:10: warning: assignment discards ‘const’ qualifier from pointer target type [enabled by default]
extptr = exec_path + strlen(exec_path);
^
script.c: In function ‘script_process_argv’:
script.c:362:12: warning: assignment discards ‘const’ qualifier from pointer target type [enabled by default]
nargv[0] = argv[0];
^
script.c:377:22: warning: assignment discards ‘const’ qualifier from pointer target type [enabled by default]
nargv[nargi++] = argv[argi++];
^
script.c:380:39: warning: assignment discards ‘const’ qualifier from pointer target type [enabled by default]
while (argi <= argc) nargv[nargi++] = argv[argi++];
^
repl.c: In function ‘handle_it’:
repl.c:1270:20: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
wta(UNDEFINED, (char *)i, ""); /* sends it to def_err_response */
^
repl.c: In function ‘def_err_response’:
repl.c:2077:47: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
lputc((long)err_pos <= ARGn ? ' ' : '1' + (int)err_pos - ARG1, cur_errp);
^
repl.c:2080:23: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
else lputs(errmsgs[((int)err_pos)-WNA].msg, cur_errp);
^
repl.c: In function ‘everr’:
repl.c:2133:11: warning: assignment discards ‘const’ qualifier from pointer target type [enabled by default]
err_pos = pos;
^
repl.c:2134:14: warning: assignment discards ‘const’ qualifier from pointer target type [enabled by default]
err_s_subr = s_subr;
^
In file included from repl.c:21:0:
repl.c:2139:24: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
COOKIE(1) : COOKIE((int)pos));
^
scm.h:260:21: note: in definition of macro ‘COOKIE’
# define COOKIE(n) (n)
^
; ================ Link C object files
(system "gcc -rdynamic -o ex1.scm continue.o scm.o scmmain.o findexec.o script.o time.o repl.o scl.o eval.o sys.o subr.o debug.o unif.o rope.o -L/home/azc/build/scm/scm/ -lm -lc")
scl.o: In function `istr2flo':
scl.c:(.text+0x1593): undefined reference to `makflo'
collect2: error: ld returned 1 exit status
; ================ Link failed!