<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof ContentPasted0 ContentPasted1">
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.
<div><br class="ContentPasted1">
</div>
<div class="ContentPasted1">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.</div>
<div><br class="ContentPasted1">
</div>
<div class="ContentPasted1">I tried to do this by uninstalling ECL from my system, and then running the following from the git repo:</div>
<div><br class="ContentPasted1">
</div>
<div class="ContentPasted1">./configure --disable-shared --prefix=`pwd`/mystaticlib</div>
<div><br class="ContentPasted1">
</div>
<div class="ContentPasted1">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:</div>
<div><br class="ContentPasted1">
</div>
<div class="ContentPasted1">hello.exe: hello.c hello-lisp.a</div>
<div class="ContentPasted1"> $(CC) -Iinclude -o $@ hello.c hello-lisp.a \</div>
<div class="ContentPasted1"> -Llib -lecl</div>
<div><br class="ContentPasted1">
</div>
<div class="ContentPasted1">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.</div>
</div>
</body>
</html>