I'm trying to explore building ECL as a static library with the eventual goal 
of cross compiling the library to run it on a homebrew Nintendo Switch.

For starters, I wanted to see if it's possible to run example `embed` by 
linking ECL built as a static library rather than the system installation.

I tried to do this by uninstalling ECL from my system, and then running the 
following from the git repo:

./configure --disable-shared --prefix=`pwd`/mystaticlib

Then built ECL, I copied the headers and lib/libecl.a from the `mystaticlib` 
folder to the `embed` example directory, and tried modifying the Makefile to 
link the static library:

hello.exe: hello.c hello-lisp.a
      $(CC) -Iinclude -o $@ hello.c hello-lisp.a \
            -Llib -lecl

Running the resulting executable gives a lot of undefined references, so I'm 
not sure if not everything gets built into libecl.a or if it's even possible to 
do what I'm trying to do. I'm not very proficient with C so sorry if this a 
dumb question, but any pointers would be greatly appreciated.

Reply via email to