Scheme学习系列二:调用C代码

xiaoxiao2021-02-28  82

1.test.scm ;;1.declare include (c-declare #<<c-declare-end #include <stdio.h> c-declare-end ) ;;2.implement (define test (c-lambda () void #<<c-code-end printf("Hello scheme.\n"); c-code-end )) ;;eval (test) 2.编译: CC = gsc -exe TARGET = test all:$(TARGET) $(TARGET): $(CC) test.scm .PHONY:clean clean: rm -f $(TARGET)

 

转载请注明原文地址: https://www.6miu.com/read-71637.html

最新回复(0)