Difference between revisions of "ECL/Building libraries"
Warning: preg_match(): Compilation failed: group name must start with a non-digit at offset 8 in /home/www/web437/html/mediawiki/includes/MagicWord.php on line 902
From formgames wiki
< ECL
(→Shared Libraries) |
|||
| Line 16: | Line 16: | ||
== Windows == | == Windows == | ||
| − | === Usage === | + | === Static Libraries === |
| + | |||
| + | TODO | ||
| + | |||
| + | === Shared Libraries === | ||
| + | |||
| + | ==== Using asdf:make-build ==== | ||
| + | |||
| + | Related documentation: | ||
| + | |||
| + | * ECL Manual: [http://ecls.sourceforge.net/new-manual/re55.html asdf:make-build] | ||
| + | |||
| + | TODO | ||
| + | |||
| + | ==== Using 'compile-file' and 'c:build-shared-library' ==== | ||
| + | |||
| + | Sources: [http://formgames.org/lisp/ecl/examples/shared-library.tar.gz shared-library.tar.gz] | ||
| + | |||
| + | ===== Usage ===== | ||
* Adapt the path of the batch file 'vcvars64.bat' in 'vsenv' to correspond to the local installation of Microsoft Visual C++. | * Adapt the path of the batch file 'vcvars64.bat' in 'vsenv' to correspond to the local installation of Microsoft Visual C++. | ||
| Line 31: | Line 49: | ||
</pre> | </pre> | ||
| − | === hello-lisp.lisp === | + | ===== hello-lisp.lisp ===== |
<pre> | <pre> | ||
| Line 37: | Line 55: | ||
</pre> | </pre> | ||
| − | === hello.c === | + | ===== hello.c ===== |
<pre> | <pre> | ||
| Line 64: | Line 82: | ||
</pre> | </pre> | ||
| − | === Makefile === | + | ===== Makefile ===== |
<pre> | <pre> | ||
| Line 93: | Line 111: | ||
</pre> | </pre> | ||
| − | === build.lisp === | + | ===== build.lisp ===== |
<pre lang=Lisp> | <pre lang=Lisp> | ||
| Line 100: | Line 118: | ||
(c:build-shared-library "hello-lisp" :lisp-files '("hello-lisp.obj") :init-name "init_lib_HELLO_LISP") | (c:build-shared-library "hello-lisp" :lisp-files '("hello-lisp.obj") :init-name "init_lib_HELLO_LISP") | ||
(quit) | (quit) | ||
| + | </pre> | ||
| + | |||
| + | ===== vsenv ===== | ||
| + | |||
| + | <pre> | ||
| + | #!/usr/bin/bash | ||
| + | |||
| + | # Batch file for setting the Microsoft Visual Studio 10.0 environment | ||
| + | vcvars64bat="C:\Program Files (x86)\Microsoft Visual Studio 10.0/VC/bin/AMD64/vcvars64.bat" | ||
| + | |||
| + | # Temporary file | ||
| + | tmpfile="$TMP/tmp$$.bat" | ||
| + | tmpfile_win=$(cygpath -m "$tmpfile") | ||
| + | |||
| + | # Generating the batch file | ||
| + | cat > $tmpfile <<EOF | ||
| + | @echo off | ||
| + | call "${vcvars64bat}" | ||
| + | bash -c "%*" | ||
| + | EOF | ||
| + | |||
| + | # Executing the temporary batch file | ||
| + | cmd /c "${tmpfile_win} $@" | ||
| + | |||
| + | # Removing the temporary file | ||
| + | rm -f $tmpfile | ||
</pre> | </pre> | ||