mirror of
https://github.com/ashinn/chibi-scheme.git
synced 2025-05-19 05:39:18 +02:00
adding c-link to chibi-ffi
This commit is contained in:
parent
8813a62b8e
commit
7d697c29c0
1 changed files with 7 additions and 1 deletions
|
@ -40,6 +40,7 @@
|
|||
(define *methods* '())
|
||||
(define *consts* '())
|
||||
(define *inits* '())
|
||||
(define *clibs* '())
|
||||
(define *tags* '())
|
||||
(define *open-namespaces* '())
|
||||
(define *c++?* #f)
|
||||
|
@ -405,6 +406,9 @@
|
|||
(define (ffi-include file)
|
||||
(load file (current-environment)))
|
||||
|
||||
(define (c-link lib)
|
||||
(set! *clibs* (cons lib *clibs*)))
|
||||
|
||||
(define (c-declare . args)
|
||||
(apply cat args)
|
||||
(newline))
|
||||
|
@ -2031,7 +2035,9 @@
|
|||
(execute (begin (eval '(import (chibi process))
|
||||
(current-environment))
|
||||
(eval 'execute (current-environment))))
|
||||
(base-args (append cflags `("-o" ,so ,dest "-lchibi-scheme")))
|
||||
(base-args (append cflags `("-o" ,so ,dest "-lchibi-scheme")
|
||||
(map (lambda (x) (string-append "-l" x))
|
||||
(reverse *clibs*))))
|
||||
(args
|
||||
(eval
|
||||
`(cond-expand
|
||||
|
|
Loading…
Add table
Reference in a new issue