Dear all,

I managed to compile s7 with cload.scm working on msys2 (windows) platform. 

Here are the steps:

1. create the file "mus-config.h" with the following line:

     #define WITH_C_LOADER 1

2. Be sure to check whether you have `dlfcn', otherwise install that using the 
pacman. Compile s7.exe using the following:

        gcc s7.c -o s7 -DWITH_MAIN -I. -O2 -g -ldl -lm 
-Wl,-export-all-symbols,--out-implib,s7.lib  -Wno-stringop-overflow

Note that it differs from the official s7 doc at only the linker flag: 
`-Wl,-export-all-symbols,--out-implib,s7.lib'


3. for libc.scm and libm.scm, you can switch to MinGW64 environment.  Excute 
`s7 libm.scm' to get the output `libc_s7.c'. It will have a compiler error 
because of the flags are not correct. Exit s7, and you can compile the 
libm_s7.c file manually by

        gcc libm_s7.c s7.lib -shared -o libm_s7.so -I. 

Alternatively, you could manually modify libm.scm changing the cflags to "-I." 
and the linker flags to "-ls7 -L.".

4. Now you can use s7 to use functions wrapped up in `libm.scm'.    

s7 is a very nice program. Thanks for who created it.

Best, A S7 user



_______________________________________________
Cmdist mailing list
[email protected]
https://cm-mail.stanford.edu/mailman/listinfo/cmdist

Reply via email to