2 Linking
(require dynext/link) | package: dynext-lib |
procedure
(link-extension quiet? input-files output-file) → any quiet? : any/c input-files : (listof path-string?) output-file : path-string?
The quiet? argument indicates whether command should be echoed to the current output port. The input-files argument is list of compiled object filenames, and output-file is the destination extension filename.
2.1 Linking Parameters
parameter
(current-extension-linker) → (or/c path-string? #f)
(current-extension-linker linker) → void? linker : (or/c path-string? #f)
The default is set by searching for an executable using the PATH environment variable, or by using the LD or MZSCHEME_DYNEXT_LINKER environment variable if it is defined (and the latter takes precedence). On Windows, it looks for "cl.exe", then "ld.exe" (gcc), then "ilink32.exe" (Borland). On Cygwin, Solaris, FreeBSD 2.x, or HP/UX, it looks for "ld". On other Unix variants, it looks for "cc". #f indicates that no linker could be found.
parameter
→ (listof (or/c path-string? (-> (listof string?)))) (current-extension-linker-flags flags) → void? flags : (listof (or/c path-string? (-> (listof string?))))
On Windows, default is (list "/LD") for "cl.exe", (list "--dll") for "ld.exe", and (list "/Tpd" "/c") for "ilink32.exe". On Unix, the default varies greatly among platforms. If the LDFLAGS or MZSCHEME_DYNEXT_LINKER_FLAGS (the latter takes precedence) environment variable is defined, then its value is parsed as a list of strings that is appended before the defaults.
parameter
→ (-> path-string? (listof string?)) (current-make-link-input-strings proc) → void? proc : (-> path-string? (listof string?))
parameter
→ (-> path-string? (listof string?)) (current-make-link-output-strings proc) → void? proc : (-> path-string? (listof string?))
On Windows, the default converts "file" to (list "/Fefile") for "cl.exe", something like (list "-e" "_dll_entry@12" "-o" "file") for "ld.exe", and something complex for "ilink32.exe". On Unix, the default converts "file" to (list "-o" "file").
parameter
→ (listof (or/c path-string? (-> (listof string?)))) (current-standard-link-libraries libs) → void? libs : (listof (or/c path-string? (-> (listof string?))))
For most platforms, the default is
(list (build-path (collection-path "mzscheme" "lib") (system-library-subpath) (mzdyn-thunk)))
where mzdyn-thunk produces (list "mzdyn.o") for the 'cgc variant and (list "mzdyn3m.o") for the '3m variant. See also current-use-mzdyn).
parameter
(current-use-mzdyn use-mzdyn?) → void? use-mzdyn? : boolean?
parameter
(link-variant) → (or/c 'normal 'cgc '3m)
(link-variant variant-symbol) → void? variant-symbol : (or/c 'normal 'cgc '3m)
2.2 Helper Functions
procedure
(use-standard-linker name) → void?
name : (or/c 'cc 'gcc 'msvc 'borland 'cw)
2.3 Signature
(require dynext/link-sig) | package: dynext-lib |
signature
dynext:link^ : signature
Includes everything exported by the dynext/link module.
2.4 Unit
(require dynext/link-unit) | package: dynext-lib |
value