Hi Brad,
Here are the steps to reproduce the error I am getting.
This is the structure of the sample project folder:
myapp
--> core
----> a.scm
----> b.scm
--> myapp.scm
The contents of the scheme files are:
````
;; core/a.scm
(define (fa)
"hello from a")
;; core/b.scm
(define (fb)
"hello from b")
;; myapp.scm
(display (fa))
(newline)
(display (fb))
(newline)
````
I build an executable like this:
````
$ gsc -o myapp -exe ./core/*.scm myapp.scm
=> hello from a
=> hello from b
````
All is fine. Now I try to bundle core as a static library:
````
$ gsc -c -o ./core/b.c ./core/b.scm
$ gsc -c -o ./core/a.c ./core/a.scm
$ gsc -link -flat -o ./core/ab.c ./core/*.c
$ gsc -obj -o ./core/ab.o ./core/ab.c
$ ar -rc ab.a ./core/ab.o
````
I link the library while building the app:
````
$ gsc -o myapp -ld-options "ab.a" -exe myapp.scm
*** WARNING -- "fa" is not defined,
*** referenced in: ("/Users/me/myapp/app.c")
*** WARNING -- "fb" is not defined,
*** referenced in: ("/Users/me/myapp/app.c")
````
Now if I run `./myapp` it gives me this error:
````
$ ./myapp
*** ERROR IN | app| -- Operator is not a PROCEDURE
(#!unbound)
````
So what am I doing wrong?
Thanks,
--Vijay