[CM] a short guide on compile on msys2/windows with cload.scm

x.x. chai xxchai at kias.re.kr
Thu May 20 07:43:07 PDT 2021


Thinking MSYS is just as the same as Linux. For
example, the procedure command-line in r7rs.scm
works.

In the file, you also forgot about the cflags and
ldflags. See attached.

On Mon, May 17, 2021 at 06:28:55AM -0700, bil at ccrma.Stanford.EDU wrote:
> > Would you mind give some pointers on how to get the path of
> > the s7 binary?
> 
> I don't know about msys or windows, but one thing to
> look at is s7.c line 97490 or so which looks at
> argv[0] when s7 runs standalone.  It uses realpath
> but it isn't foolproof.
> 
> (The problems in this regard convinced me to make
> nrepl completely self-contained).
> 
> _______________________________________________
> Cmdist mailing list
> Cmdist at ccrma.stanford.edu
> https://cm-mail.stanford.edu/mailman/listinfo/cmdist
-------------- next part --------------
--- cload.scm	2021-05-20 23:39:37.310446800 +0900
+++ cload.scm~	2021-05-20 23:39:32.997222700 +0900
@@ -680,8 +680,8 @@
 	      ((or (provided? 'mingw) (provided? 'msys2)) ; from chai xiaoxiang
 	       ;; you'll need dlfcn which can be installed with pacman, and remember to build s7 with -DWITH_C_LOADER=1
 	       ;; in msys2:  gcc s7.c -o s7 -DWITH_MAIN -DWITH_C_LOADER=1 -I. -O2 -g -ldl -lm -Wl,-export-all-symbols,--out-implib,s7.lib
-	       (system (format #f "gcc ~A s7.lib -shared -o ~A -I."
-			       c-file-name so-file-name)))
+	       (system (format #f "gcc ~A s7.lib -shared -o ~A -I. ~A ~A"
+			       c-file-name so-file-name cflags ldflags)))
 	       
 	      (else ; linux netbsd
 	       (system (format #f "~A -fPIC -c ~A -o ~A ~A ~A" 


More information about the Cmdist mailing list